windows 如何让 wget 安静下来?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1459088/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 06:44:59  来源:igfitidea点击:

How do I make wget properly quiet?

windowswget

提问by izb

wget always echoes system values to the console, even when I specify -q (quiet) on the command line, e.g.:

wget 总是将系统值回显到控制台,即使我在命令行上指定 -q(安静),例如:

C:\> wget -q http://www.google.com/
SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = C:\Program Files\GnuWin32/etc/wgetrc

C:\>

How do I make the noise stop?

如何让噪音停止?

采纳答案by akira

that should work:

这应该有效:

%> wget.exe parameters_here  1> NUL 2> NUL

回答by Heiko Hatzfeld

Try adding a >NUL:

尝试添加一个>NUL

wget -q http://www.google.com/ >NUL

回答by Bob Stein

The more I rely on wget the more annoying these messages get. Appears to be a bug in wget version 1.11.4(details here), a 2008 vintage that is still the "latest" binary for Windows. I prefer this work-around:

我越依赖 wget,这些消息就越烦人。似乎是 wget版本 1.11.4(详情请点击此处)中的一个错误,该版本是 2008 年的版本,仍然是 Windows 的“最新”二进制文件。我更喜欢这种解决方法:

wget  ...parameters...  2>>wgeterr.log

@akira 2>NUL makes the two lines go away, but I'm concerned what other error messages it may suppress. The following do not work: >NUL (output is to stderr) nor -q, nor -nv.

@akira 2>NUL 使这两行消失,但我担心它可能会抑制哪些其他错误消息。以下不起作用:>NUL(输出到标准错误)也不是 -q,也不是 -nv。