Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I use the combination of Flashgot and wget for downloads. I reset my Firefox preferences due to some other problems. Then I reconfigured everything (including add-ons, cache, etc).

After that, when I tried to download something, it automatically saved into the "Videos" folder. But before resetting the settings, I could download items to "Downloads".

What should I do to make the default directory of wget to "Downloads"?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

As far as I was aware wget usually downloads into the current working directory. You have the following options to specify the directory.

1.Change to the directory you wish it to be downloaded to first then run your wget command.

cd /home/yourname/Downloads

Then run your wget command

wget http://download.files.com/software/files.tar.gz

2.Add the directory to the wget command like this.

wget http://download.files.com/software/files.tar.gz -O /home/yourname/Downloads
share|improve this answer
    
when i clicks on the flashgot icon, there is no need of executing commands manually. It shows commands automatically in an X-Terminal. There is no space to type a comand. It does everything automatically. And i need to change the default folder. –  001neeraj Nov 6 '12 at 8:41
    
Your question asks about the "wget default directory" and you go on to say "I use the combination of Flashgot and wget for downloads". You might want to clarify that you are looking for the default download directory of Flashgot. This should help forums.informaction.com/viewtopic.php?f=6&t=4811 –  CoalaWeb Nov 6 '12 at 9:14
    
The link helped me. Thanks a lot. –  001neeraj Dec 16 '12 at 2:39

wget by default will store downloads to the current directory where you run the wget command.


Method 1: Pass the -P option to specify a download directory

  • To change the directory, you need to add the -P argument in your wget command:

    wget -P /path/to/directory <download-url>
    

    Or

    wget --directory-prefix=prefix <download-url>
    

    where prefix is the directory where you want the downloads to be stored.

    With this method, you need to specify the -P or --directory-prefix=prefix every time you download.

Method 2: Use alias to make a permanent default directory

  • To set a permanent default download directory, you can use alias, like this:

    alias wget='wget --directory-prefix=prefix'
    

    Change prefix with the directory you want and put the alias command on .bashrc to make it permanent.

share|improve this answer
    
when i clicks on the flashgot icon, there is no need of executing commands manually. It shows commands automatically in an X-Terminal. There is no space to type a comand. It does everything automatically. And i need to change the default folder. –  001neeraj Nov 6 '12 at 8:56
    
I see. Try the second method, since Flashgot will use the system's wget settings. –  Peachy Nov 6 '12 at 9:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.