(10) wgetでファイルを取得

投稿者: | 2013年7月23日

2,235 views

この記事は最終更新から 3164日 が経過しています。

wget コマンドは、httpや ftpプロトコルでファイルを取得できる。

[user@ ~]$ wget http://www.xxxxxxx.xxx/page1/

再帰的に全ファイルを取得する場合は -r オプションを指定する。

[user@ ~]$ wget -r http://www.xxxxxxx.xxx/page1/

再帰的にN階層目までファイルを取得する場合は -l N オプションを指定する。
例えば、3階層目までで -l 3 とする。

[user@ ~]$ wget -l 3 http://www.xxxxxxx.xxx/page1/

その他のオプションは man で見る。

[user@ ~]$ man wget

アクセス数(直近7日): ※試験運用中、BOT除外簡易実装済
  • 2026-01-25: 1回
  • 2026-01-24: 0回
  • 2026-01-23: 0回
  • 2026-01-22: 0回
  • 2026-01-21: 1回
  • 2026-01-20: 1回
  • 2026-01-19: 3回
  • コメントを残す

    メールアドレスが公開されることはありません。 が付いている欄は必須項目です