* using ctime date-30
# test
$ find /tmp/*.foo -depth -type d -ctime +30
# removal
$ find /tmp/*.foo -depth -type d -ctime +30 —exec rm {} \;
* using mtime date-15
# test
$ find /tmp/*.foo -depth -type f -mtime +15
# removal
$ find /tmp/*.foo -depth -type f -mtime +15 -exec rm {} \;
No comments:
Post a Comment