Quick find/delete command

Delete everything older then 6 hours old in current directory . . .

find . -cmin +360 -maxdepth 1 -exec rm -rf {} ;

1 comment

  1. I just happened to notice this entry I had made and wanted to mention that the rm -rf will also delete directories – I wouldn’t recommend running this unless you really need to. Most of the time you can just run:

    find . -cmin +360 -maxdepth 1 -exec rm -f {} ;

Leave a comment

Your email address will not be published. Required fields are marked *