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.
Written by Ali Asad Lotia
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Utilities
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#