In my web server(apache is running, Linux CentOS),
there is a very large log file(50 Gbyte).
This web server have some web services in production.
When I tried to delete the log file,
web server had no response about 10 seconds.
(Service out time.)
rm -f monthly.log
Is there any way to delete this large file without apache freezing?
Best Answer
Rotate it first via
logrotate
, using a config like this:then create a cron job at midnight to delete the rotated file: