Monday, May 14, 2012

Zip files using 'find' command

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

# for i in `find /var/log/nmon -mtime +7 -type f -print`; do gzip $i; done

No comments:

Post a Comment

Popular Posts

About Me

My photo
I have started this blog to share my work experience and spread some smart solutions on Linux to Internet community. I'm hoping more people will get benefited from this blog. Brief about me: I have 14+ years experience working as System Admin and currently work with VMware.