How to truncate a log file using Ubuntu 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.logThere are some other great tips over on the Bash Cures Cancer blog.
Technorati Tags: Truncate, Log, File, Ubuntu, Linux, Andrew Beacock



Buy Stuff From Amazon
2 Comments:
Thanks a bunch. Just what I was looking for.
:> filename
(colon greater-than filename) is a much shorter syntax :)
Post a Comment