Linux 快速清空文件内容的方法。

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/whosheng/article/details/49802051

几种快速清空文件内容的方法:

  $ : > filename #其中的 : 是一个占位符, 不产生任何输出.

  $ > filename

  $ echo “” > filename

  $ echo /dev/null > filename

  $ echo > filename

  $ cat /dev/null > filename

猜你喜欢

转载自blog.csdn.net/whosheng/article/details/49802051