3

これは非常に奇妙wget動作です。私はdebian 7.2を使用しています。

wget -r -O - www.blankwebsite.com

永久にハングします。つまり、ハングします。インターネットを検索していませんstrace。私がこれを行う場合:

while read R
do
   wget -r -O - www.blankwebsite.com
done < smallfile

1 行がsmallfile含まれている場合、コマンドは数秒で終了します。

私も試してみました

wget -r -O - localhost/test.html

空のtest.htmlファイルでも同じ結果になります。私には、それはバグのように聞こえます。を変更または削除すると、
すべてが正常に実行されます。に出力を渡すので 使用しました。 誰かがそれを説明できますか?似たようなものを見たことがありますか?-O --O myfile-r
-O -grep

4

3 に答える 3

0

ドキュメントに記載されているように:

 Similarly, using '-r' or '-p' with '-O' may not work as you expect:
 Wget won't just download the first file to FILE and then download
 the rest to their normal names: _all_ downloaded content will be
 placed in FILE.  This was disabled in version 1.11, but has been
 reinstated (with a warning) in 1.11.2, as there are some cases
 where this behavior can actually have some use.

これは既知の問題であり、何らかの方法でダウンロードされることもあります。シーク不可能なファイルで -r および -O を使用しても、wget がデータをファイルに直接シリアル化する方法では機能しません。

于 2013-11-11T10:32:44.517 に答える