Wget

為什麼 wget -r 不獲取所有 FTP 子目錄?

  • March 3, 2018

當我執行命令時:

wget -r ftp://user:paswword@ftp.xxxx.ovh.net/

它缺少任何子子目錄。遞歸 FTP 有限制嗎?

你得到了多少級?如果需要超過 5 個,則需要提供-l選項。

男人 wget

-r
--recursive
   Turn on recursive retrieving.    The default maximum depth is 5.

-l depth
--level=depth
   Specify recursion maximum depth level depth.
-m
--mirror 
Turn on options suitable for mirroring. 
This option turns on recursion and time-stamping, 
sets infinite recursion depth and keeps FTP directory listings. 
It is currently equivalent to ‘-r -N -l inf --no-remove-listing’.

wget 的 -m 選項是無限遞歸

-m
--mirror 
Turn on options suitable for mirroring. 
  This option turns on recursion and time-stamping, 
  sets infinite recursion depth and keeps FTP directory listings. 
  It is currently equivalent to ‘-r -N -l inf --no-remove-listing’.

感謝您的幫助。

引用自:https://unix.stackexchange.com/questions/185728