Thursday, October 29, 2009

Find and delete old files in Linux

Delete old files under Linux OS:

Command:
$ find /var/log -mtime +60 -type f -exec rm -rf {} \;

Description:
Command will delete files from directory /var/log which were last modified at least 60 days ago.

Source:
LinuxQuestions

No comments: