Simple life, Complicated mind
Wednesday, January 5, 2011
如何清空 log 檔案?
如何清空 log 檔案?
如果是 tcsh,先 unset noclobber,接著 cat /dev/null > logfile。
如果是 bash,先 set -o noclobber off,接著 cat /dev/null > logfile。
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment