Укажите каталог, в котором загружаются wget

Нажмите ctrl + E, и вы сможете сохранить его в других форматах, таких как jpg png или перейти в файл, и нажать «Экспорт» ... и вы сможете сохранить его.

1
задан 12 June 2015 в 18:25

2 ответа

Вам нужно добавить -P /your/chosen/directory к вашей команде.

1
ответ дан 23 May 2018 в 19:54
  • 1
    Спасибо, я также обнаружил, что мне нужно указать -nd, чтобы он захватывал только файлы и не создавал каталоги – Need4Sleep 12 June 2015 в 18:19

Добавьте параметр -P:

wget -P "2010/01/01" -nd -r --no-parent --reject "index.html*" http://water.weather.gov/precip/p_download_new/2010/01/01/

И более общий. С этой версией папка вывода определяется автоматически:

URL="http://water.weather.gov/precip/p_download_new/2010/01/01/"; wget -P "$(awk -F'/' '{ print $(NF-3),$(NF-2),$(NF-1)}' OFS="/" <<<$URL)" -nd -r --no-parent --reject "index.html*" "$URL"

из man wget

-P prefix
   --directory-prefix=prefix
       Set directory prefix to prefix. 
       The directory prefix is the directory where all other files and
       subdirectories will be saved to, i.e. the top of the retrieval
       tree.  The default is . (the current directory).

-nd
   --no-directories
       Do not create a hierarchy of directories when retrieving
       recursively.
       With this option turned on, all files will get saved to the
       current directory, without clobbering (if a name shows up more
       than once, the
       filenames will get extensions .n).
1
ответ дан 23 May 2018 в 19:54

Другие вопросы по тегам:

Похожие вопросы: