How to compress / zip a directory in Linux

To compress in tar.gz format:

tar -cv /directory | gzip > archive.tar.gz

To decompress the tar.gz file:

tar -zxvf archive.tar.gz

Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *