GZIP can compress a file reducing it to 70 or 80 percent. Unlike
tar it replaces the original file with a compressed version. The compressed file has the same ownership modes, access time, and modification time as the original.
Decompress Files
To decompress files use
gzip –d, gunzip,
or
gzcat
Options
gzip filename.txt
This will produce a compressed file called
filename.txt.gz, and
filename.txt will be deleted.
To decompress
filename.txt.gz run the following:
gunzip filename.txt.gz
This will produce
filename.txt and delete
filename.txt.gz
Using the -n
Sets the speed at which files are compressed. The faster a file is compressed, the lower the amount of compression performed. With the
-# option,
# can be any number between 1 and 9 where 1 is the fastest and 9 is the slowest. The
--fast option is the equivalent to
-1 whereas
–best is the equivalent to
-9. By default gzip performs compression as thought the
-6 option was specified.
No comments:
Post a Comment
Please feel free to leave a comment