ftpでwget:デフォルトページ生成を無効にする

ftpでwget:デフォルトページ生成を無効にする

サブフォルダをダウンロードしようとしています。ファイル転送プロトコル。データファイルのみ。
私は以下を使用しています:wget -nH -np --cut-dirs=5 -r http://sss.com/1/2/3/4/5


残念ながら、wgetはダウンロードしたファイルのリストを含むindex.htmlという追加のファイルを生成します。

名前を変更するパラメータが見つかりました。しかし、wgetが生成することをまったく許可しない項目を見つけることができませんでした。他のファイルではなく、ftpサブフォルダのコピーのみが必要です。

私は何を逃したことがありませんか?それともrm index.html唯一の選択ですか?

ベストアンサー1

私の推測が正しい場合は、index.htmlをダウンロードしないでください。その後、wgetマンページで次のものが必要です。

   -R rejlist --reject rejlist
       Specify comma-separated lists of file name suffixes or patterns to
       accept or reject. Note that if any of the wildcard characters, *,
       ?, [ or ], appear in an element of acclist or rejlist, it will be
       treated as a pattern, rather than a suffix.  In this case, you have
       to enclose the pattern into quotes to prevent your shell from
       expanding it, like in -A "*.mp3" or -A '*.mp3'.

wgetしたがって、ダウンロードするファイルのリストからindex.htmlを除外するように指示する-R index.htmlを追加する必要があります。

おすすめ記事