how do you suppress the output of this command?

How do you suppress the output (and error messages, if any) of the following command into a logfile? If you could, please type out the exact command. Thanks.

/usr/sfw/bin/wget Yahoo!

I tried using this, but it didn’t put the output or error messages into the file:

/usr/sfw/bin/wget Yahoo! > logfile

I also typed the following, but it didn’t work.

/usr/sfw/bin/wget Yahoo! 2>&1 >> logfile

I got the error message: Ambiguous output redirect

I wanted any output messages or any error messages to be redirected into that file.

i have NO idea what you are trying to do…

first a short trip to the manual (man wget) for the program named
‘wget’ will show you that the correct syntax to make a wget log file
would be

wget --output-file=/[full path]/[desired.logfile.name]

second there is no program called wget in /usr/swf/bin/wget on my
machine…i don’t even have a /usr/swf directory, so i wonder why you
do)…did YOU add that? have you installed a program which added that?

does that program you added have a name? does it have documentation on
how to run it…and, have you looked at that documentation??

and, last: it appears from your note that you are attempting to use
wget to DOWNLOAD the entire website at yahoo.com, and i have to wonder
just how big your hard drive is??

but, as for the general question you asked in Programming/Scripting
about directing program output to a log file: i believe “ken_yap” most
usually knows what he is talking about…if you tried his answer and
didn’t get the expected results i’d recommend you ask him another
question…[and stop trying to download yahoo.com:slight_smile: ]


Andy Sipowicz