Clear file content & command truncate

  1. : > file

     

  2. cat /dev/null > file

     

truncate:

belongs to coreutils package.

truncate from the end of the file.

 

posted @ 2022-01-25 11:54  ascertain  阅读(25)  评论(0编辑  收藏  举报