在Linux中隐藏wget输出 [英] Hide wget output in Linux
本文介绍了在Linux中隐藏wget输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用wget
时我不想看到任何消息.
I don't want to see any message when I use wget
.
我尝试了wget
和-q
-O
选项并重定向到/dev/null
,但是我仍然看到不需要的消息.
I tried wget
with -q
-O
options and redirection to /dev/null
but I still see unwanted messages.
编辑
对不起,每个人,我的脚本中还有另一个wget可以打印消息:) &> /dev/null
对我来说足够了.
EDIT
Sorry everyone, there was another wget in my script which printed messages :) &> /dev/null
was enough for me.
推荐答案
为什么不使用-q
?
来自man wget
:
-q
--quiet
Turn off Wget's output.
测试
$ wget www.google.com
--2015-05-08 14:07:42-- http://www.google.com/
Resolving www.google.com (www.google.com)...
(...)
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘index.html’
[ <=> ] 17,913 --.-K/s in 0.01s
2015-05-08 14:07:42 (1.37 MB/s) - ‘index.html’ saved [17913]
并且:
$ wget -q www.google.com
$
这篇关于在Linux中隐藏wget输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文