3 ms·
Learning find is a worthy investment. find ./ -name "*.log" -size +2G -ctime +3 | xargs -P 8 gzip Will find all log files over 2 gigs and older than 3 day
by Dobbs 14y ago
Learning find is a worthy investment.
find ./ -name "*.log" -size +2G -ctime +3 | xargs -P 8 gzip
Will find all log files over 2 gigs and older than 3 days. Then it will gzip them split across 8 parallel gzip processes.