tar.gz example
Example 1: tar gz linux command
tar -czvf projects.tar.gz projects/
Example 2: linux tar command
Create a new tar archive.
$ tar cvf archive_name.tar dirname/
Extract from an existing tar archive.
$ tar xvf archive_name.tar
View an existing tar archive.
$ tar tvf archive_name.tar
Example 3: tar.gz files
tar -czvf name-of-archive.tar.gz /path/to/directory-or-file
Example 4: tar cmd
# tar cvzf MyImages-14-09-12.tar.gz /home/MyImages
OR
# tar cvzf MyImages-14-09-12.tgz /home/MyImages