Use Wget Downloading a file to a Specific Directory

Last Updated: Tue, July 26, 2022

Wget will store files in the current directory by default. You can use the -P option to specify the directory where you want to save the file.

Now my current directory is /root, download the .ico file you downloaded previously, but this time save it with -P option to the /root/wget.

wget -P wget/

Downloading a file to a specific directory

You can use ls wget to see if the file was saved in the wget directory.

If you interest in my articles, please consider buying me a coffee.

Write Your Comment