Zip / gzip / tar and beyond

Compressing files can gain you a lot of diskspace. That’s one thing. But now a days, a disk isn’t so expensive. So why still bother to compress your files? I use the zip function mostly to put all my files into one file. This is easier to transfer a bunch of files over the internet, mail, usb sticks…

To compress a complete folder into one file, you can use following command:

tar -zcvf 20130403_something.tar.gz /folder/subfolder/subsub

Of course, after compressing something, you also want to decompress it:

tar -zxvf 20130403_something.tar.gz

Look into zip files:

zcat syslog-123123132-201608*gz | egrep -i ‘sb029|sb060’ | grep ‘^Aug’