(1)清空
[root@localhost ~]# true > a.txt
(2)清空
[root@localhost ~]# > a.txt
(3)清空(会留一个空行
)
[root@localhost ~]# echo > a.txt
或
[root@localhost ~]# echo "" > a.txt
(1)清空
[root@localhost ~]# true > a.txt
(2)清空
[root@localhost ~]# > a.txt
(3)清空(会留一个空行
)
[root@localhost ~]# echo > a.txt
或
[root@localhost ~]# echo "" > a.txt