S
S
Sergey Pugovkin2018-03-25 01:27:31
bash
Sergey Pugovkin, 2018-03-25 01:27:31

How to download a file via curl (command line), automatically creating a directory?

How to download a file via curl (command line), automatically creating a directory?
For example: site.ru/dir/file.txt
You need to download this file by creating dir
This option

curl --raw --remote-name http://site.ru/dir/file.txt

ignores directories, creates file1.txt directly in the current one.
Or wget?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zmd, 2018-03-25
@Driver86

wget --force-directories

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question