21

I currently have a shell script running on a linux server which is using wget in oder to download a remote web page. This in turn is executed by a cron job which is scheduled to run at certain times.

Can someone please confirm that adding in the -q option will not only stop all output being returned to the console, but will also stop all attempts by wget to write to the logs or to try and create a log file?

2
  • I was looking for a similar feature that OP had a question about. I found that the -a option was useful for my case. Adding this option will append to a log file that you specify instead of overwriting the old log file. Example: wget https://website/to/data1.zip -a data.wget.log.report & wget https://website/to/data2.zip -a data.wget.log.report &
    – jesseaam
    Aug 22, 2018 at 17:01
  • Caveat to above comment: you should not run commands at the same time because they will be trying to both write to the log file at the same time. The log file might end up being indecipherable.
    – jesseaam
    Aug 22, 2018 at 17:13

2 Answers 2

23

no, --quiet will not guarantee no logs.

from wget 1.13 ChangeLog:

2008-04-22 Steven Schubiger

   * http.c (print_response_line): Changed to make responses always
   be logged, even in --quiet mode, if --server-response was
   specified. This is to bring http.c's handling of the situation
   in line with ftp.c's.
0
13

With -q option, wget itself should not output anything to either console nor the logfile specified by -o option, except for the case described by Michał. The logfile however will be created (if -o was supplied).

This however does not guarantee that no system daemons will notice the fact that wget was run - the network activity can be independently monitored by other tools.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .