Showing posts with label find. Show all posts
Showing posts with label find. Show all posts

Thursday, July 5, 2012

Find command usage

How to clean up data when ever disk usage exceeds the threshold limit.
Among the many ways do it, here is the simple usage of Unix find command to delete files older than a year.

find . -type f -mtime +365 -delete
Where -mtime +365 suggests to list files older than 365 days.
or
 find . -type f -atime +365 -delete
Where -atime stands for access time which is when the file was last read.

Some more examples