Best way to delete old unwanted log files??
Hello Linux Gurus,
What would be the best way to purge old unwanted files by the volume without bringing down the server due to spike CPU processing? Please advise. Thanks, J |
I recommend that you use logrotate.
http://linuxcommand.org/man_pages/logrotate8.html ----------------------- Steve Stites |
These log files are being generated through in-house process. Could I use this utility "logrotate" to clean up other log files being generated through other process? There are couple thousands of these files and I would like to clean them up on a daily bases.
Thank you so much for your advice. J |
Hi,
Yes! Code:
excerpt from 'man logrotate'; |
If logrotate doesn't work for you, you can also look into using tmpwatch which comes with most standard distributions.
|
I will check it out - Thank you!
Would you know how to configure it? J |
On the next question;
Would you guys know how to deal with OCFS/OCFS2 Filesystem? I am trying to list out some files in there and it's taking an hour to do so, not mentioning delete files. Any ideas?? Thanks, J |
All times are GMT -5. The time now is 02:14 PM. |