Quick find/delete command
Delete everything older then 6 hours old in current directory . . .
find . -cmin +360 -maxdepth 1 -exec rm -rf {} \;
|
|
|
|
|
|
|
|
|
|
|
|
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 rem -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 {} \;
Posted February 7, 2008, 5:16 pm