LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-26-2007, 07:16 AM   #1
Kryptos
Member
 
Registered: Nov 2007
Posts: 47

Rep: Reputation: 15
Downloads. GUI/command line, wget. Specify where to save.


Hi everyone.
How can I specify where to save the files downloaded?
Using GUI by default files are saved to Desktop folder, and I don`t know how to change this, actually I want to save files in the /shared partition.
I can do it from the command line using wget but how to specify the "place" where data will be saved from the command line?
I would like to learn to downloads using both methods. Can you help me?

Thanks in Advance.
 
Old 12-26-2007, 07:32 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
with wget, the -O option defines an absolute or relative output file, whilst -P defines a relative of absolute directory, as detailed in the manpage.
 
1 members found this post helpful.
Old 12-26-2007, 08:11 AM   #3
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Quote:
Originally Posted by Kryptos View Post
Using GUI by default files are saved to Desktop folder, and I don`t know how to change this
A generic answer would be to look for the options or preferences settings in whatever software you're using. If you need more detailed information, then you'll have to tell us what the software is.
 
Old 12-26-2007, 08:28 AM   #4
Kryptos
Member
 
Registered: Nov 2007
Posts: 47

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by acid_kewpie View Post
with wget, the -O option defines an absolute or relative output file, whilst -P defines a relative of absolute directory, as detailed in the manpage.
Thanks for the clue.
I am trying to download Oracle database software.
Like i said I want to know I to do it using both methods, including GUI.
I tried:

cd /shared && wget <url>

but the page only display one url for various downloads: http://download.oracle.com so I can`t choose what I want to download this way. With GUI it would work but I still need to change the "place" where to save.

Thanks in Advance.
 
Old 12-26-2007, 08:38 AM   #5
lord-fu
Member
 
Registered: Apr 2005
Location: Ohio
Distribution: Slackware && freeBSD
Posts: 676

Rep: Reputation: 30
If it is mozilla or something similar the default location to save is changed through the preferences as mentioned by Nylex.

Quote:
but the page only display one url for various downloads: http://download.oracle.com so I can`t choose what I want to download this way. With GUI it would work but I still need to change the "place" where to save.
The link you gave still requires you to log in and choose the proper download etc even with a browser. In order to wget the file you want you need a proper url to the file not an index page; then the output option would work as mentioned by acid_kewpie. Use links or lynx and you will be able to choose a file and navigate via command line if you wish.

Last edited by lord-fu; 12-26-2007 at 08:40 AM.
 
Old 12-26-2007, 11:54 AM   #6
gerbenny
LQ Newbie
 
Registered: Dec 2007
Location: Prince Edward Island
Distribution: Debian Etch
Posts: 17

Rep: Reputation: 0
hello,

Here's what I do to get the proper download link.

Using most browsers, just at the point where you choose the download mirror, right click on the link, and choose "Save Path", or "Copy Shortcut". Then paste from your cliborad into the command shell for the url.

Sometimes you need to referring url to grab the proper redirected php download mirror. I use a Firefox/Iceweasel download manager plug in called "Down them All!" Just as you start the download using this plug-in, you get the download php file, with th ereferring url. Use both in wget.
 
Old 12-29-2007, 06:25 AM   #7
Kryptos
Member
 
Registered: Nov 2007
Posts: 47

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by gerbenny View Post
hello,

Here's what I do to get the proper download link.

Using most browsers, just at the point where you choose the download mirror, right click on the link, and choose "Save Path", or "Copy Shortcut". Then paste from your cliborad into the command shell for the url.

Sometimes you need to referring url to grab the proper redirected php download mirror. I use a Firefox/Iceweasel download manager plug in called "Down them All!" Just as you start the download using this plug-in, you get the download php file, with th ereferring url. Use both in wget.
Thanks for the clue gerbenny.
 
Old 12-29-2007, 07:50 AM   #8
Kryptos
Member
 
Registered: Nov 2007
Posts: 47

Original Poster
Rep: Reputation: 15
Oracle Download problem

Hi again.
I didn`t download Oracle yet... I did what you said. Now I copied the link location instead of the site, http://download.oracle.com/otn/linux...1_database.zip
I wrote wget -P /shared http://download.oracle.com/otn/linux...1_database.zip
but basically it says that permission it`s denied.

"Resolving profile.oracle.com... 141.146.8.116
Connecting to profile.oracle.com|141.146.8.116|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4,054 (4.0K) [text/html]
/home/otnLogin.jsp?remoteIp=213.58.21.79&globalId=&redirectUrl=http:%2F%2Fdownload-llnw.oracle.com:80%2Fotn%2Flinux%2Foracle11g%2Flinux_11gR1_database.zip.1: Permission denied

Cannot write to `/home/otnLogin.jsp?remoteIp=213.58.21.79&globalId=&redirectUrl=http:%2F%2Fdownload-llnw.oracle.com:80%2Fotn%2Flinux%2Foracle11g%2Flinux_11gR1_database.zip.1' (Success)."

Can you help me?

Thanks in Advance.
 
Old 12-29-2007, 09:12 AM   #9
gerbenny
LQ Newbie
 
Registered: Dec 2007
Location: Prince Edward Island
Distribution: Debian Etch
Posts: 17

Rep: Reputation: 0
You have the correct download link. The command your using
Code:
wget -P /shared http://...
is going to a folder on your root partition.

You are either not root, or the folder is not owner by your current logged in user.

Either do this, change the ownership to your username/group:
Code:
sudo chown -R User:Group /shared
or use sudo for the wget:
Code:
sudo wget -P /shared http://...

Here's my output when testing, I broke the download when it started.
Code:
daman@flie:~$ sudo mkdir /shared
Password:
daman@flie:~$ sudo chown daman:daman /shared/
daman@flie:~$ wget -P /shared http://download.oracle.com/otn/linux/oracle11g/linux_11gR1_database.zip
--10:57:23--  http://download.oracle.com/otn/linux/oracle11g/linux_11gR1_database.zip
           => `/shared/linux_11gR1_database.zip'
Resolving download.oracle.com... 208.111.133.54, 208.111.133.52, 208.111.133.53
Connecting to download.oracle.com|208.111.133.54|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1,844,533,232 (1.7G) [application/zip]

 0% [                                     ] 6,957          1.45K/s
daman@flie:~$ sudo mkdir /shared1
daman@flie:~$ wget -P /shared1 http://download.oracle.com/otn/linux/oracle11g/linux_11gR1_database.zip
--10:58:23--  http://download.oracle.com/otn/linux/oracle11g/linux_11gR1_database.zip
           => `/shared1/linux_11gR1_database.zip'
Resolving download.oracle.com... 208.111.133.53, 208.111.133.54, 208.111.133.52
Connecting to download.oracle.com|208.111.133.53|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://profile.oracle.com/jsp/realms/otnLogin.jsp?remoteIp=142.176.115
.196&globalId=&redirectUrl=http%3a%2f%2fdownload-llnw.oracle.com%3a80%
2fotn%2flinux%2foracle11g%2flinux_11gR1_database.zip [following]
--10:58:37--  https://profile.oracle.com/jsp/realms/otnLogin.jsp?remoteIp=142.176.115
.196&globalId=&redirectUrl=http%3a%2f%2fdownload-llnw.oracle.com%3a80%
2fotn%2flinux%2foracle11g%2flinux_11gR1_database.zip
           => `/shared1/otnLogin.jsp?remoteIp=142.176.115.196&globalId=&redirectUrl=h
ttp:%2F%2Fdownload-llnw.oracle.com:80%2Fotn%2Flinux%2Foracle11g%2Flin
ux_11gR1_database.zip'
 
Old 12-29-2007, 09:59 AM   #10
Kryptos
Member
 
Registered: Nov 2007
Posts: 47

Original Poster
Rep: Reputation: 15
Hi.
I tried to download as root and I am the only user of this computer.
I downloaded another files to /shared partition without any error but the problem remains with the site I gave you, so I don`t understand why this works only for some files.
How do you that is going to a folder on my root partition?


Kind Regards
 
Old 12-29-2007, 04:11 PM   #11
gerbenny
LQ Newbie
 
Registered: Dec 2007
Location: Prince Edward Island
Distribution: Debian Etch
Posts: 17

Rep: Reputation: 0
The preceding slash on the folder name indicates that it is on the root partition (/).

If the wget command is executed like this:
Code:
daman@flie:~$ pwd
/home/daman
daman@flie:~$ wget -P shared http://...
The files will be downloaded to /home/daman/shared.

If the wget command is executed like this:
Code:
daman@flie:~$ pwd
/home/daman
daman@flie:~$ wget -P /shared http://...
The files will be downloaded to /shared.

As for the other files your attempting to download, you provided a link for the 11g dataabse.zip file (a single file) so far. What are the other files your attempting to download that are problematic, please provide output.

Regards,
 
Old 12-30-2007, 12:10 AM   #12
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Quote:
Originally Posted by gerbenny View Post
The preceding slash on the folder name indicates that it is on the root partition (/).
Your use of "root partition" is wrong. You could have /home on a separate partition (i.e. not the root partition), but that partition would still be mounted on /home. What you mean to say is that the directory is directly under (or above, I suppose) the root of the directory tree (as opposed to being somewhere like /home/foo/shared, which is several levels above/below the root).
 
Old 12-30-2007, 04:15 AM   #13
gerbenny
LQ Newbie
 
Registered: Dec 2007
Location: Prince Edward Island
Distribution: Debian Etch
Posts: 17

Rep: Reputation: 0
Quote:
Your use of "root partition" is wrong. You could have /home on a separate partition (i.e. not the root partition), but that partition would still be mounted on /home. What you mean to say is that the directory is directly under (or above, I suppose) the root of the directory tree (as opposed to being somewhere like /home/foo/shared, which is several levels above/below the root).
You are correct, somtimes I still think in M$ Winblows. Thanks for the clarification.
 
Old 01-01-2008, 12:41 PM   #14
Kryptos
Member
 
Registered: Nov 2007
Posts: 47

Original Poster
Rep: Reputation: 15
Hi Again.
I am trying to download Oracle 11g but I can`t do it using the command line. When I download a site there isn`t no problem, when downloading using the link of Oracle I can`t do it. Now I know how to specify where the file will be saved the initial question but a problem remains and I didn`t achieve a conclusion.
Please check what happens:

1. for the site

[root@localhost ~]# wget -P /shared www.sapo.pt
--16:12:00-- http://www.sapo.pt/
=> `/shared/index.html.3'
Resolving www.sapo.pt... 213.13.146.140
Connecting to www.sapo.pt|213.13.146.140|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]

[ <=> ] 63,772 53.67K/s

16:12:01 (53.53 KB/s) - `/shared/index.html.3' saved [63772]

2. for Oracle

[root@localhost ~]# wget -P /shared http://download.oracle.com/otn/linux...1_database.zip
--16:13:08-- http://download.oracle.com/otn/linux...1_database.zip
=> `/shared/linux_11gR1_database.zip'
Resolving download.oracle.com... 87.248.199.22, 87.248.199.20
Connecting to download.oracle.com|87.248.199.22|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://profile.oracle.com/jsp/realm...1_database.zip [following]
--16:13:08-- https://profile.oracle.com/jsp/realm...1_database.zip
=> `/shared/otnLogin.jsp?remoteIp=213.58.21.79&globalId=&redirectUrl=http:%2F%2Fdownload-llnw.oracle.com:80%2Fotn%2Flinux%2Foracle11g%2Flinux_11gR1_database.zip'
Resolving profile.oracle.com... 141.146.8.116
Connecting to profile.oracle.com|141.146.8.116|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4,054 (4.0K) [text/html]
/shared/otnLogin.jsp?remoteIp=213.58.21.79&globalId=&redirectUrl=http:%2F%2Fdownload-llnw.oracle.com:80%2Fotn%2Flinux%2Foracle11g%2Flinux_11gR1_database.zip: Invalid argument

Cannot write to `/shared/otnLogin.jsp?remoteIp=213.58.21.79&globalId=&redirectUrl=http:%2F%2Fdownload-llnw.oracle.com:80%2Fotn%2Flinux%2Foracle11g%2Flinux_11gR1_database.zip' (Success).



1. Why can I download the site this way and I can`t download the database?
2. What should I do to download this program using the command line?

Thanks in advance.
 
Old 01-01-2008, 05:42 PM   #15
gerbenny
LQ Newbie
 
Registered: Dec 2007
Location: Prince Edward Island
Distribution: Debian Etch
Posts: 17

Rep: Reputation: 0
On the Oracle download page, there is a JavaScript Routine, that you need to click on "I Agree", to be allowed to download the file. Unfortunatly wget has no provision for this.

I tried to get the file to start downloading with lynx, but was unable to.

You will need to download the software using a JavaScript enabled browser, or another computer, then transfer to your Linux machine.
 
  


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
How can I save a website by command-line? [KIA]aze Programming 3 02-19-2008 10:53 AM
Is it possible to save a website, all links included, from the command line? rm_-rf_windows Linux - General 7 06-29-2007 04:45 AM
command line vs gui resnostyle Linux - Newbie 19 05-19-2006 07:24 AM
command line and GUI kpachopoulos Linux - Newbie 3 08-22-2004 09:13 AM
Need help getting to GUI from command line Negativ13 Linux - Newbie 6 02-25-2003 03:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:56 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