Reese Knowledgebase

How to /dev/null or zero out a bunch of log files in one command

View Kristian Reese's profile on LinkedIn


If you like this article, please +1 or Recommend via FB with the provided buttons above:

Article ID: 107
by: Reese K.
Posted: 23 May, 2013
Last updated: 23 May, 2013
Views: 1794

~# cd /var/log

~# cat /dev/null | tee {boot.log,cron,dmesg,lastlog,messages,secure,vzctl.log,vznetcfg.log,wtmp}

This article was:   Helpful | Not Helpful
Prev   Next
Display top 10 processes eating up memory     Extract contents of initrd

Showing: 1-1 of 1  
Comments
Anonymous | 10 Sep, 2013 11:26 AM
>boot.log>cron>dmesg>messages

>file

Will 0 byte files too. ;)
Prev   Next
Display top 10 processes eating up memory     Extract contents of initrd

RSS