顺手一个for循环解决清空各种系统日志。
LIST="boot.log btmp cron dmesg lastlog maillog messages secure spooler tallylog wtmp yum.log"
for NAME in $LIST; do echo> /var/log/$NAME;done
history -c
如果是已使用比较久的系统需要加入一些删除命令。
有啥不开心的事,给我开心一下?
顺手一个for循环解决清空各种系统日志。
LIST="boot.log btmp cron dmesg lastlog maillog messages secure spooler tallylog wtmp yum.log"
for NAME in $LIST; do echo> /var/log/$NAME;done
history -c
如果是已使用比较久的系统需要加入一些删除命令。