[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
例は,その複雑さから大まかに三つのセクションに分けています.
7.1 簡単な使用方法 | Simple, basic usage of the program. | |
7.2 高度な使用方法 | Advanced tips. | |
7.3 非常に高度な使用方法 | The hairy stuff. |
wget http://fly.srk.fer.hr/ |
wget --tries=45 http://fly.srk.fer.hr/jpg/flyweb.jpg |
wget -t 45 -o log http://fly.srk.fer.hr/jpg/flyweb.jpg & |
行の終りのアンパサンドはWgetがバックグラウンドで動作することを確実にし ます.再挑戦の回数を無制限にするため,`-t inf'を使用してください.
wget ftp://gnjilux.srk.fer.hr/welcome.msg |
wget ftp://ftp.gnu.org/pub/gnu/ links index.html |
wget -i file |
ファイル名として`-'を指定した場合,URLは標準入力から読み込ま れます.
wget -r http://www.gnu.org/ -o gnulog |
wget --convert-links -r http://www.gnu.org/ -o gnulog |
wget -p --convert-links http://www.server.com/dir/page.html |
HTMLページは`www.server.com/dir/page.html'に保存され,そして 画像とスタイルシートなども,リモートのサーバにあった場所に依存して, `www.server.com/'以下に保存されます.
wget -p --convert-links -nH -nd -Pdownload \ http://www.server.com/dir/page.html |
wget -S http://www.lycos.com/ |
wget -s http://www.lycos.com/ more index.html |
wget -r -l2 -P/tmp ftp://wuarchive.wustl.edu/ |
wget -r -l1 --no-parent -A.gif http://www.server.com/dir/ |
より冗長ですが,効果は同じです.`-r -l1'は,最大深度が1の再帰的な 回収(see section 3. 再帰的な回収)を意味します.`--no-parent'は親 ディレクトリへの参照を無視すること(see section 4.3 ディレクトリベースの制限)を意 味し,`-A.gif'はGIFファイルのみをダウンロードすることを意味 します.`-A "*.gif"'も動作します.
wget -nc -r http://www.gnu.org/ |
wget ftp://hniksic:mypassword@unix.server.com/.emacs |
しかし,この使用方法は,ps
の出力を見たユーザにパスワードがされ
られるので,複数ユーザのシステムでは推奨されないことに注意して下さい.
wget -O - http://jagor.srce.hr/ http://www.srce.hr/ |
二つのオプションを組み合わせ,リモートのホットリストからドキュメントを 回収するパイプラインを作成することも可能です.
wget -O - http://cool.list.com/ | wget --force-html -i - |
crontab 0 0 * * 0 wget --mirror http://www.gnu.org/ -o /home/me/weeklog |
wget --mirror --convert-links --backup-converted \ http://www.gnu.org/ -o /home/me/weeklog |
wget --mirror --convert-links --backup-converted \ --html-extension -o /home/me/weeklog \ http://www.gnu.org/ |
または,より入力が少ない以下を用います.
wget -m -k -K -E http://www.gnu.org/ -o /home/me/weeklog |
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |