Clearing Down Large Log Files in Linux Quickly
You should use something like logrotate to manage you log files however sometimes you are not interested in the log content and just want to clear them. Especially if you have multi GB files due to excessive errors. In this situation use:
This will clear the file but not remove it. It is possible that a process has locked the file, in which case track it down with:
Finding large files in Linux can be tricky especially if there is no X. This can help:
Just change the path to the directory you are interested in, in this case where the logs are usually located.