Wednesday, December 3, 2014

Compressing with Gzip and Zip

Compressed files use less disk space and download faster than large, uncompressed files.

To compress a file,
# gzip filename.ext

The file will be compressed and saved as filename.ext.gz.

To expand a compressed file, type:
#gunzip filename.ext.gz

To compress a file with zip, type the following:
#zip -r filename.zip files

To extract the contents of a zip file, type:
#unzip filename.zip

No comments:

Post a Comment