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
注 :> 重写,覆盖式 >> 尾部追加
缘于生活,而归于工作。本人所书,而意于分享。
如有转载,请注明出处!
--活出自己范儿
1、重建
[root@small-sun shine]# rm -rf old.txt [root@small-sun shine]# touch old.txt
2、重写
[root@small-sun shine]# echo "" > old.txt
注 :> 重写,覆盖式 >> 尾部追加