Many times we have a requirement where we want to delete old files. We rather want to delete files based on their creation date-say "n" days old.
For this we have very simple command in solaris->
find /directoryname -mtime +n -exec rm {} \;
example->
find /u9/prddb/9.2.0/admin/PRD_prddb/bdump -mtime +7 -exec rm {} \;
The above command will delete the files which are 7 days old in bdump directory.
No comments:
Post a Comment