Сборка нескольких подсистем

Добавьте параметр -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).
0
задан 2 April 2018 в 21:53

0 ответов

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

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