LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   how to specify the name of the wget output file (https://www.linuxquestions.org/questions/linux-networking-3/how-to-specify-the-name-of-the-wget-output-file-522191/)

datasink 01-23-2007 07:06 PM

how to specify the name of the wget output file
 
With lynx, I can use a 'lynx -dump' and redirect the output to a specific file name. How do I do the equivalent in wget? It seems to send save the file as the same name that was on the source location. This isn't bad if source is a straight-forward html or text file but when when you are invoking a cgi script with an argument, you get the argument as the filename that is saved. I can't see any flag that you can use to name the file. -o is the closest but this names the log file.

To summarize, I would like to be able to do something like:
wget www.xyz.com > test1.html
Is there some equivalent to this with wget?

wjevans_7d1@yahoo.co 01-23-2007 07:27 PM

See the wget man page for the output-document option.

datasink 01-23-2007 07:39 PM

I had been looking at the man page. I guess I didn't realize there was a difference between -o (specifies the log file) and -O (specifies the file I needed).

What I used is "wget -O test1.txt some-url"

Thanks, it works.


All times are GMT -5. The time now is 09:06 AM.