Operating System - HP-UX
1832870 Members
3540 Online
110048 Solutions
New Discussion

Output 'wget' wont go to file

 
Nobody's Hero
Valued Contributor

Output 'wget' wont go to file

Anyone know why I cant get this command to go to a file?

# /usr/sfw/bin/wget http://s1d.xxx.xxx:28080 >> xx
--15:47:44-- http://s1d.xxx.xxx:28080/
=> `index.html.2'
Resolving s1d.xxx.xxx... 172.xxx.xx.xx Connecting to s1d.xxx.xxx:28080... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://s1d.xxx.xxx:28443/ [following]
--15:47:44-- https://s1d.xxx.xxx:28443/
=> `index.html.2'
Connecting to s1df.xxx.xxx 172.xx.xx.xx]:28443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 42 [text/html]

100%[======================================================================================>] 42 --.--K/s

15:47:44 (410.16 KB/s) - `index.html.2' saved [42/42]

[!] root@s1dfa7d (/tmp) #
[!] root@s1dfa7d (/tmp) #
[!] root@s1dfa7d (/tmp) # more xx
[!] root@s1dfa7d (/tmp) # ll
total 146
drwxrwxrwt 6 root sys 752 Aug 28 15:47 .
drwxr-xr-x 32 root root 1024 Aug 28 15:45 ..
drwxrwxr-x 2 root root 176 Jul 26 10:08 .X11-pipe
drwxrwxr-x 2 root root 176 Jul 26 10:08 .X11-unix
-rw-r--r-- 1 root root 232 Jul 26 10:07 breg_business_logic_20070726100730661.log
drwxr-xr-x 2 root root 239 Aug 16 07:39 hsperfdata_root
-rw-r--r-- 1 root root 42 Mar 27 15:45 index.html
-rw-r--r-- 1 root root 42 Mar 27 15:45 index.html.1
-rw-r--r-- 1 root root 42 Mar 27 15:45 index.html.2
drwx------ 2 u045054 staff 184 Aug 28 13:48 ssh-ZHuS2673
-rw-r--r-- 1 root root 0 Aug 28 15:47 xx
[!] root@s1d (/tmp) #
UNIX IS GOOD
3 REPLIES 3
James R. Ferguson
Acclaimed Contributor

Re: Output 'wget' wont go to file

Hi:

# wget -o mylog url

By default, messages go to STDERR.

You can also do:

# wget -h

...to get help.

Regards!

...JRF...
Steven E. Protter
Exalted Contributor

Re: Output 'wget' wont go to file

Shalom,

I would like to see the log file but this looks like a bandwidth problem between your system and the file.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steven Schweda
Honored Contributor

Re: Output 'wget' wont go to file

> Anyone know why I cant get this command to
> go to a file?

Commands don't go to files. Program output
can go to a file. What would you like to
have go to standard output? What would you
like to happen to the messages?

> # wget -h

Usually a good idea. As it says there (wget
1.10.2 -- what's yours, or should we already
know that?):

-o, --output-file=FILE log messages to FILE.

-O, --output-document=FILE write documents to FILE.


In fact, "-O -" should work to send a simple
downloaded document to stdout (whence ">>"
will append it where you say). Note,
however, that "-O" messes with the operation
of some of the other popular options, so if
you want to do anything non-simple, you may
need to be more creative.

A search for "-O" at
http://www.mail-archive.com/wget@sunsite.dk/
should reveal some of the potential problems.