To Find and Remove Files that has updated x days ago

Where X is the number of days

find . -mtime +X -exec ls -l {} \;

to remove these files

find . -mtime +X -exec rm -f {} \;

Leave a Reply