How to change wget default directory from 'Videos' to 'Downolads'?
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.
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 -P /home/yourname/Downloads http://download.files.com/software/files.tar.gz