linux 清空文件内容命令

1、重建

[root@small-sun  shine]# rm  -rf  old.txt
[root@small-sun  shine]# touch    old.txt

2、重写

[root@small-sun  shine]# echo "" > old.txt

  注 :> 重写,覆盖式     >>  尾部追加

posted @ 2019-05-15 17:17  活出自己范儿  Views(1669)  Comments(0)    收藏  举报