Created
August 17, 2016 15:29
-
-
Save lg3bass/42c23357e1857c127a76c1d52121d0ab to your computer and use it in GitHub Desktop.
UNIX tar.gz a directory via ssh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//source: http://unix.stackexchange.com/questions/93139/can-i-zip-an-entire-folder-using-gzip | |
//In order to "zip" a directory, the correct command would be | |
tar -zcvf archive.tar.gz directory/ | |
//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. | |
//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