没有日志文件的WGET

Joe*_*oel 14 linux wget

每次我使用wget http://www.domain.com时,我的服务器上都会自动保存一个日志文件.无论如何在没有记录的情况下运行此命令?

谢谢,

乔尔

Pau*_*bel 28

你可以尝试-o和-q

-o logfile
   --output-file=logfile
       Log all messages to logfile.  The messages are  
       normally reported to standard error.
-q
 --quiet
     Turn off Wget's output.
Run Code Online (Sandbox Code Playgroud)

所以你有:

wget ... -q -o /dev/null ...
Run Code Online (Sandbox Code Playgroud)

  • 您还需要使用-O选项来防止保存下载文件的副本(可能是-O/dev/null) (2认同)
  • Windows机器的等价物是`-q -O nul`. (2认同)

Alb*_*gni 6

这会将网站内容打印到标准输出,当您说您不想记录到文件时,这是什么意思?

wget -O - http://www.domain.com/
Run Code Online (Sandbox Code Playgroud)