如何在cmd.exe中将stderr重定向到null

问题描述 投票:106回答:1

我有一个应用程序,它会将大量噪音记录到stderr,并且真的会减慢应用程序的执行速度。我想将该输出重定向到null。这可能与cmd.exe一起使用吗?

redirect stderr cmd
1个回答
155
投票
Your DOS command 2> nul

阅读页面Using command redirection operators。除了Tanuki Software提到的“2>”结构外,它还列出了一些其他有用的组合。

© www.soinside.com 2019 - 2024. All rights reserved.