wget回転バックアップの問題

wget回転バックアップの問題

私はwget次のように1.11.4を呼び出します

$ wget -nd -S -N --backups=4 -r --no-parent --reject="index.html*" -e robots=off <url>

サーバーからすべてのファイルを繰り返しダウンロードします。私の問題は、既存のファイルがローリングバックアップを受け取らないことです。または最大1つのファイルです。したがって、最終的には2つのファイルしか存在myfileしません。myfile.1myfile.2

なぜそんなことですか?特にwget4つのバックアップファイルを作成してもらいました。

ベストアンサー1

それは私のために働きます。 --backups は新しいオプションです。たとえば、私のRHEL6.5システムにはこの機能はありませんが(wget 1.12)、ローカルFedoraシステムにはあります(wget 1.14)。

他のオプションなしで簡単なテストを試してみましたか?これは私にとって効果的です。

>mkdir test; cd test

>wget -q --backups=4 http://ddg.gg/
>ls
index.html

>wget -q --backups=4 http://ddg.gg/
>ls
index.html  index.html.1

>wget -q --backups=4 http://ddg.gg/
>ls
index.html  index.html.1  index.html.2

>wget -q --backups=4 http://ddg.gg/
>ls
index.html  index.html.1  index.html.2  index.html.3

>wget -q --backups=4 http://ddg.gg/
>ls
index.html  index.html.1  index.html.2  index.html.3  index.html.4

>wget -q --backups=4 http://ddg.gg/
>ls
index.html  index.html.1  index.html.2  index.html.3  index.html.4

おすすめ記事