Linux清空文本内容

测试文件:test.txt

第一种:

$> test.txt

image.png

 

第二种:

$echo "" > test.txt

image.png

 

第三种:

$cat /dev/null > test.txt

image.png

posted @ 2019-11-18 16:14  sucre_tan  阅读(338)  评论(0编辑  收藏  举报