1、vim 编辑器

  vim /tmp/file

  :1,$d  或 :%d

2、cat 命令

  cat /dev/null > /tmp/file

 

相关文章:

  • 2022-12-23
  • 2021-07-06
  • 2022-12-23
  • 2021-08-30
  • 2021-09-15
  • 2021-10-30
  • 2022-12-23
  • 2021-11-30
猜你喜欢
  • 2021-10-29
  • 2022-01-19
  • 2021-06-22
  • 2022-12-23
相关资源
相似解决方案