LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-23-2007, 08:06 PM   #1
datasink
Member
 
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 www.xyz.com > test1.html
Is there some equivalent to this with wget?
 
Old 01-23-2007, 08:27 PM   #2
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 31
See the wget man page for the output-document option.
 
Old 01-23-2007, 08:39 PM   #3
datasink
Member
 
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.
 
  


Reply


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 04:56 PM
where does konqueror and wget downloaded file go eatmars Linux - Software 2 08-28-2005 11:11 PM
wget a random file on phone server sub_moa Programming 16 07-01-2005 06:56 PM
wget any version of a file? shishimo Linux - General 1 07-08-2004 02:37 PM
the sound gives output when using mic but no output when run a music file medo Debian 0 04-19-2004 08:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

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