45

wget を使用してサブディレクトリのみをダウンロードするにはどうすればよいですか? ダウンロードするサブディレクトリを指定できますか?

ありがとう!

4

3 に答える 3

81

できるよ:

wget -r -l1 --no-parent http://www.domain.com/subdirectory/

どこ:

-r: recursive retrieving
-l1: sets the maximum recursion depth to be 1
--no-parent: does not ascend to the parent; only downloads from the specified subdirectory and downwards hierarchy
于 2012-11-18T14:48:35.217 に答える
16
$ wget -m -p -E -k -K -np {URL Address}

オプションの詳細については、man ページを使用できます。

注:前のオプションでは、ファイルのインデックスがダウンロードされます!

于 2014-02-19T08:46:20.307 に答える
3

うまく使えた情報。私は試した:

wget -r -l1 --親なし http://www.domain.com/subdirectory/

name.subname.subname2.etc.htm または .html の形式の複数のファイルを含むサイト。これらを拾うために私は走った:

wget -r --親なし http://www.domain.com/subdirectory/

これはうまくいきました。

于 2014-09-19T21:14:05.507 に答える