j-9hgq
Last Updated: February 25, 2016
·
1.099K
· lotia
B9d7297223985ffafd0b1981b6cdcb28

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.

Say Thanks
Respond
Filed Under