LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 11-01-2007, 04:13 AM   #1
basha_msc
LQ Newbie
 
Registered: Jan 2007
Posts: 4

Rep: Reputation: 0
Question Saving a file from a known URL


How to save a file from a known URL to my shell window when i don't have GUI
 
Old 11-01-2007, 04:47 AM   #2
contusion
Member
 
Registered: Mar 2005
Posts: 310

Rep: Reputation: 34
use wget or curl

wget url
or
curl -o filename url

http://www.spreadfirefox.com/?q=affi...211983&t=1
 
Old 11-01-2007, 06:49 AM   #3
dansmith127
LQ Newbie
 
Registered: Apr 2007
Distribution: Ubuntu 7.10
Posts: 21

Rep: Reputation: 15
Filename

wget url

saves the output to whatever original file is called, for example:

wget http://google.com/index.html

saves the output as index.html. To specify a different filename:

wget -O YourFileNameChoice.html http://www.google.com/index.html
 
Old 11-02-2007, 12:30 AM   #4
basha_msc
LQ Newbie
 
Registered: Jan 2007
Posts: 4

Original Poster
Rep: Reputation: 0
I want to know the command to store the file from a known URL to my shell window
 
Old 11-02-2007, 06:14 AM   #5
dansmith127
LQ Newbie
 
Registered: Apr 2007
Distribution: Ubuntu 7.10
Posts: 21

Rep: Reputation: 15
Quote:
I want to know the command to store the file from a known URL to my shell window
That doesn't really make sense. The standard output of wget is not the file, but rather the info about what it's doing ('Downloading file... 4 bytes... etc').

wget always 'stores' (saves) the file to your current directory, whether you want it to or not.

If you want to suppress the standard output, and have a command which will download a file and then print the files contents to your terminal screen, try this:

wget -q -O yourfilename.html http://www.somesite/somepage.html && less yourfilename.html

This will download the file without giving any standard output (-q means 'quiet' mode), save it to your current working directory with whatever filename you specify after the -O flag, then open up that same file for viewing using 'less'. You could also use 'more' or your favourite text editor, eg 'vim', 'emacs', in place of 'less'.
 
  


Reply

Tags
url


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
By default is url file access disabled? got_nix Linux - Server 6 07-04-2007 10:46 AM
Downloading a file from Url in perl bratieres Programming 2 03-01-2006 12:49 AM
How do I link a file to a URL site. AZDAVE Linux - Networking 2 10-14-2004 06:30 PM
Sed, and how to get the file name from an URL the who Programming 2 06-08-2004 01:20 PM
Help completing URL file association bmcneely0 Linux - General 0 08-18-2003 04:33 PM


All times are GMT -5. The time now is 07:36 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration