Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 01-23-2007, 07:06 PM   #1
Registered: Nov 2005
Distribution: Ubuntu
Posts: 46

Rep: Reputation: 17
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 > test1.html
Is there some equivalent to this with wget?
Old 01-23-2007, 07:27 PM   #2
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 30
See the wget man page for the output-document option.
Old 01-23-2007, 07:39 PM   #3
Registered: Nov 2005
Distribution: Ubuntu
Posts: 46

Original Poster
Rep: Reputation: 17
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
wGet is there a command for file size? SonoranFun Linux - Software 2 01-02-2006 03:56 PM
where does konqueror and wget downloaded file go eatmars Linux - Software 2 08-28-2005 10:11 PM
wget a random file on phone server sub_moa Programming 16 07-01-2005 05:56 PM
wget any version of a file? shishimo Linux - General 1 07-08-2004 01:37 PM
the sound gives output when using mic but no output when run a music file medo Debian 0 04-19-2004 07:17 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:26 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration