# Working with .tar.gz archives
# Create and extract .tar.gz files
xinit@localhost:~$ # Create a .tar.gz archive:
xinit@localhost:~$ tar -czvf archive.tar.gz /path/to/source/dir
xinit@localhost:~$ # Create a .tar.gz archive with long options:
xinit@localhost:~$ tar \
--create --gunzip --verbose --file \
archive.tar.gz /path/to/source/dir
xinit@localhost:~$ # Extract a .tar.gz archive:
xinit@localhost:~$ tar -xzvf archive.tar.gz
xinit@localhost:~$ # Extract a .tar.gz archive with long options:
xinit@localhost:~$ tar \
--extract --gunzip --verbose --file \
archive.tar.gz
xinit@localhost:~$ # List of all available options:
xinit@localhost:~$ tar --help