Technical Notes 技術文件

User Rating: 0 / 5

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
 

每次都想要清空某個記錄檔,但一直都找不到好方法。我介紹下面二個Linux撇步來簡單清空記錄檔

 

第一步,用 truncate 

truncate logfile --size 0

 

第二步,用 cat

cat /dev/null > logfile 
© 2018 www.chaoman.com. All Rights Reserved. Designed By JoomLead
免責聲明:本站提供的內容僅供網路測試及研究用途,並無任何販售行為及獲得任何利益!
Disclaimer: All content provided by this website is for testing and research purpose. This website is not involved in any sales activity nor generate profit with its content.