News:

To still receiving newsletters from us please subscribe to our Newsletters:
http://tech.groups.yahoo.com/group/developers-Heaven/

Main Menu

How to (compress) gzip a folder?

Started by admin, November 20, 2010, 06:49:13 AM

Previous topic - Next topic

admin

How to gzip a folder?

Gzip can only compress a single file. tar can archive multiple files, but it doesn't compress them. Therefore the two tools are oftne used together: first you archive all the files into one with tar, then you compress that file with gzip (that's the z option in the tar command).

tar -cvzpf archive.tar.gz /home/example/public_html/folder

To uncompress again:

tar -xvzpf archive.tar.gz