Skip to content

Instantly share code, notes, and snippets.

@andrezrv
Created December 24, 2013 19:03
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save andrezrv/8116839 to your computer and use it in GitHub Desktop.
Save andrezrv/8116839 to your computer and use it in GitHub Desktop.
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/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment