Find files older than X days in Linux
Find files older the X days.
-delete for removal
Code Markup
$ find . -mtime +180 -print
$ find /to/your/directory -mtime +180 -print
$ find . -mtime +180 -delete;
$ find . -mtime +180 -exec rm -f {} ;
Find files older the X days.
-delete for removal
$ find . -mtime +180 -print
$ find /to/your/directory -mtime +180 -print
$ find . -mtime +180 -delete;
$ find . -mtime +180 -exec rm -f {} ;