1. Download File Manager Free
AdobeDirectory

I need to use wget to download a file to the directory /var/cache/foobar/ (so, as an example, if I download stackexchange-site-list.txt, it'd be downloaded to /var/cache/foobar/stackexchange-site-list.txt)

Mar 20, 2018 - Examples to download files using curl command line tool. Latest.tar.gz from remote server and save in current directory with same name.

Is this possible? curl would also be an option, but I'd prefer to not use curl, since it's not installed by default.

jrgjrg

3 Answers

If you know the name of the file ahead of time, you can use the -O option to wget to tell it where to write the file.

Tim KennedyTim Kennedy
ephemientephemient

To add: The above code would allow you to download ALL files from the targeted directory to the directory of your choice in a single command.

Break Down of Command:

The Parameters for which wget uses to download the entire directory at once instead of one file at a time:

The Destination of Downloaded Files

The Origin of Files (Online Directory)

AdamplexAdamplex

Download File Manager Free

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