Deleting the files between particular dates
Code:
find ./ -mtime +30 -type f -print
The
above command will show all files modified 30 days ago or more - use the print
statement first to be sure that you find the correct files and do check it's
what you want. Then you can run the command again with the delete function
added like this;
Code:
find ./ -mtime +30 -type f -exec rm {} \;
No comments:
Post a Comment