linux下清空文件的方法

来源:互联网 发布:保密局检查软件 编辑:程序博客网 时间:2024/03/29 01:26

linux下经常会用到将日志清空的方法

1.使用echo命令

  echo > test.log 


2.使用true

   true > test.log 


3.使用/dev/null

   cat /dev/null > test.log

 

0 0
原创粉丝点击