DELETING FILES AT OS LEVEL
$ df -h .
$ find . -name "*.trc" -mtime +7 -exec ls -ltr {} \;
$ find . -name "*.trc" -mtime +7 -exec rm {} \;
df -h .
$ find . -name "*.trm" -mtime +7 -exec ls -ltr {} \;
$ find . -name "*.trm" -mtime +7 -exec rm {} \;
$ df -h .
$ find . -name "*.gz" -mtime +7 -exec ls {} \;
$ find . -name "*.gz" -mtime +7 -exec rm -rf {} \;
NOTE
find . -name "*.trc" -mtime +7 -exec gzip {} \;
"Hope for the best, prepare for the worst"
-Dharmendra
hi macchi,
ReplyDeleteIts very useful.