gzip

 

gzip is a common use compress tool, fast and easy to use.

this will compress and replace filename with filename.gz it is useful when zipping single files like log :

gzip filename

unzip by gzip -d , this will also replace filename.gz with filename :

gzip -d filename.gz

a tricky thing, gzip -r will compress every single file inside directory, not the folder itself :

gzip -r foldername

reference link :

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/4/html/Step_by_Step_Guide/s1-managing-compressing-archiving.html