Windows命令行中重定向stdout和stderr到NUL,就可以避免程序输出任何字符到控制台,所有的字符都输出到NUL中去了,NUL不是文件名,可以理解为一个不存在的文件,所以也无法查看NUL咯,等于抛弃了标准输出和错误输出。

具体的例子如,

wget 2>NUL 1>NUL

在linux环境下,想要达到同样的效果可以使用下面的命令:

wget 2>/dev/null 1>/dev/null

So easy~.

 

原文地址:https://blog.csdn.net/mister_exia/article/details/17763217

相关文章:

  • 2021-08-17
  • 2022-12-23
  • 2021-12-20
  • 2021-06-18
  • 2022-12-23
  • 2021-12-15
  • 2021-10-12
  • 2021-11-13
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-16
  • 2022-03-02
  • 2021-12-25
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案