So, in order to "zip" an entire folder, the command is:
tar -zcvf archive.tar.gz folder-name/
This will tell tar to c (create) an archive from the files in the folder (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.On another way around, to decompress and unpack the archive into the current directory:
tar -zxvf archive.tar.gz
No comments:
Post a Comment