通过将 stdout 和 stderr 重定向到特殊文件“nul”,可以使任何命令行实用程序完全静音。这相当于 Windows 在 *nix 系统上的 /dev/null 。
command >nul (stdout is not echoed)
command 2>nul (stderr is not echoed)
command >nul 2>&1 (neither stdout nor stderr is echoed)
Run Code Online (Sandbox Code Playgroud)
后者是你想让它完全静音的那个。
归档时间: |
|
查看次数: |
7181 次 |
最近记录: |