dmitry-pro
10/12/2017 - 10:57 AM

Examples on how to compress and uncompress using Tar.

Examples on how to compress and uncompress using Tar.

###################
# Compress a folder
###################
tar czfv test.tar.gz test/
# "czfv" stands for "Compress Zip File Verbose"
# If you want bzip files, use "j" instead of "z".

###################
# Uncompress a file
###################
tar -xzf test.tar.gz
# "x" stands for "eXtract".
# Again, if you want bzip files, use "j" instead of "z".

# Source: http://txt.binnyva.com/2007/02/command-to-compressuncompress-targz-and-tarbz2-files/