How to truncate a log file using Linux
Have you ever wanted to truncate a log file that was being written to by a running process without stopping the process to do so?
If so then all you need is the following to clear out the active log file:
cat /dev/null > some_log_file.log
Have you ever wanted to truncate a log file that was being written to by a running process without stopping the process to do so?
If so then all you need is the following to clear out the active log file:
cat /dev/null > some_log_file.log