Delete everything older then 6 hours old in current directory . . .
find . -cmin +360 -maxdepth 1 -exec rm -rf {} ;
Ramblings of a Utah System Administrator
Delete everything older then 6 hours old in current directory . . .
find . -cmin +360 -maxdepth 1 -exec rm -rf {} ;
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 {} ;