I am writing a website and I want to automate the process of compressing and archiving the current Release folder, moving it into the Legacy folder, then moving the contents of the Dev folder into Release. I don't understand tar and gzip very well so I would like some help with the compressing and archiving part.
Here is what I have so far:
# Change to the Reviews directory
# First compress the contents of the current Release folder called Release.mm-dd-yy
# Compress and archive release folder here
# Move the compressed archive to ./Legacy
mv -r "./Release.$NOW.tar.gz" ./Legacy
# Clear the folder for the new files
rm -r *
mv -r ./Dev/* ./Release
echo "Completed successfully.\n"