linux下快速清空文本文件中的内容

1.[root@desktop?huage]#?😕>?filename

:是一个占位符,不会产生任何输入

?

2.[root@desktop?huage]#?>?filename

同样不会产生任何输出

?

3.[root@desktop?huage]#?echo?“”?>?filename

会看到一行空行,文件大小是1byte

?

4.[root@desktop?huage]#?echo?>?filename

会看到一行空行,文件大小是1byte

?

5.[root@desktop?log]#?cat?/dev/null?>?filename

文件不会产生任何输出

linux下快速清空文本文件中的内容
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
Scroll to top
0
Would love your thoughts, please comment.x
()
x