Google
 
Web QrooniX

Wednesday, September 12, 2007

Another Find: Finding and Deleting Files Based On Date Creation

To find and delete directories:

find -type d -mtime +n -daystart | xargs rm -rf

For files:

find -mtime +n -daystart | xargs rm -rf

To be sure, we can pipe the result to a text file to double-check the files:

find -mtime +n -daystart > find-result.txt

Enjoy deleting!

Labels: ,


This page is powered by Blogger. Isn't yours?