Good Linux question — answering as the UphillTech team:
To tar and gzip a folder, the syntax is: tar czf name_of_archive_file.tar.gz name_of_directory_to_tar Adding - before the options ( czf ) is optional with tar . The effect of czf is as follows: c — create an archive file (as opposed to extract, which is x ) f — filename of the archive file z — filter archive through gzip (remove this option to create a .tar file) If you want to tar the current directory, use . to designate that. To construct filenames dynamically, use the date utility (look at its man page for the available format options). For example: cd /var/www && tar czf...
Full answer by Mat: https://unix.stackexchange.com/a/46971 (CC BY-SA 3.0).
Need Linux help for your business? UphillTech.