tag:blogger.com,1999:blog-11593374.post1331368436561745474..comments2008-12-18T05:20:51.609ZComments on Andrew Beacock's Blog: How to truncate a log file using Ubuntu Linuxabeacockhttp://www.blogger.com/profile/01039992884679308726noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-11593374.post-87782367419838510902008-12-18T05:20:00.000Z2008-12-18T05:20:00.000Z2008-12-18T05:20:00.000Zdepending on the log file you might also want to s...depending on the log file you might also want to send a HUP to the program that has the file open. Eg. if you truncate /var/log/messages do a 'sudo killall -HUP syslogd'Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-11593374.post-40571381855730840872008-11-17T15:52:00.000Z2008-11-17T15:52:00.000Z2008-11-17T15:52:00.000Zbut, if the file is still being appended by a proc...but, if the file is still being appended by a process, it worth nothing in the sence of file size. the file will be updated to its actual size (with NULs) as soon as the appending process flushes..nowinterhttp://www.blogger.com/profile/03420965905775414539noreply@blogger.comtag:blogger.com,1999:blog-11593374.post-60645381553446678002008-02-07T15:14:00.000Z2008-02-07T15:14:00.000Z2008-02-07T15:14:00.000Z:> filename(colon greater-than filename) is a muc...:> filename<BR/><BR/>(colon greater-than filename) is a much shorter syntax :)anachronismwww.anachronism.o.uknoreply@blogger.comtag:blogger.com,1999:blog-11593374.post-25221784521925404212008-01-28T19:42:00.000Z2008-01-28T19:42:00.000Z2008-01-28T19:42:00.000ZThanks a bunch. Just what I was looking for.Thanks a bunch. Just what I was looking for.askbillhttp://www.blogger.com/profile/18286505281468856645noreply@blogger.com