Every time I use wget http://www.domain.com a Log file is being saved automatically on my server. is there anyway to run this command without logging?
Thanks,
Joel
Every time I use wget http://www.domain.com a Log file is being saved automatically on my server. is there anyway to run this command without logging?
Thanks,
Joel
You could try -o and -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.
So you'd have:
wget ... -q -o /dev/null ...
-q -O nul
. –
Roddie -q -O nul
may not be enough on Windows. If you have switches behind, a log file named after these switches may get created... e.g. -q -O nul --no-cache
may create a log named --no-cache! I circumvented this by using the somewhat ridiculous combination -O NUL -o NUL
! –
Hobie This will print the site contents to the standard output, is this what you mean when you say that you don't want logging to a file?
wget -O - http://www.domain.com/
I personally found that @Paul's answer was still adding to a Log file, regardless of the Command line output of -q
Added -O
to /dev/null
ontop of the -o
output file argument.
wget [url] -q -o /dev/null -O &> /dev/null
Not sure how it is on Windows, but on Linux, the lowercase -o
specifies log output file and uppercase -O
is output / download file, I use uppercase -q -O /dev/null
to prevent output. Wget manual.
© 2022 - 2024 — McMap. All rights reserved.