Last Updated: February 25, 2016
·
1.487K
· lotia

selectively compress a bunch of files

find logproc-* -type f -name "*log*" | xargs pbzip2

I want to compress a bunch of large log files that could be in different directories starting with "logproc-".

In this case, it will find all files that contain "log" in the name within directories starting with "logproc-" and compress them with pbzip2.

pbzip2 is an implementation of bzip2 that uses multiple cores to compress your files.