Monday, May 9, 2016

How to remove all files which are older than 5 days

How to list all files older than 5 days ?
> 
find /path/to/files* -mtime +5

How to delete all files older than 5 days ?
> 
 find /path/to/files* -mtime +5 -exec rm {} \;

Followers

About Me