Skip to content

Instantly share code, notes, and snippets.

@lg3bass
Created January 29, 2016 21:15
Show Gist options
  • Save lg3bass/baa32072e5fc66c68bf2 to your computer and use it in GitHub Desktop.
Save lg3bass/baa32072e5fc66c68bf2 to your computer and use it in GitHub Desktop.
UNIX > tar.gz
//tar.gz
//source: http://unix.stackexchange.com/questions/93139/can-i-zip-an-entire-folder-using-gzip
//This will tell tar to c (create) an archive from the files in directory (tar is recursive by default),
//compress it using the z (gzip) algorithm, store the output as a f (file) named archive.tar.gz,
//and v (verbosely) list all the files it adds to the archive.
//In order to "zip" a directory, the correct command would be
tar -zcvf archive.tar.gz directory/
//To decompress and unpack the archive into the current directory you would use
tar -zxvf archive.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment