Sunday, March 27, 2022

Zip files using 'find' command

Let's say we want to Zip files which are more than a week time under a folder /dir1/fldr1:

# for i in `find /dir1/fldr1 -mtime +7 -type f -print`; do gzip $i; done