Home /how to remove old log files on Unix with find command
how to remove old log files on Unix with find command
Submitted by jasper on Tue, 08/01/2013 - 09:44
You can also remove all file older then 150 day by executing this command:
- find $LOGDIR -name "*log*" -mtime +150 -type f -exec rm -f {} \;
or
- cd <DIRECTORY>
- find . -name "*log*" -mtime +150 -type f -exec rm -f {} \;