您可以依靠通常可以正常处理ftp的wget(至少以我自己的经验)。例如:
wget -r ftp://user:pass@server.com/
您也可以使用
-m适合镜像的。目前等同于
-r -N -l inf。
如果凭据详细信息中包含一些特殊字符,则可以指定
--user和
--password参数以使其生效。具有特定字符的自定义登录的示例:
wget -r --user="user@login" --password="Pa$$wo|^D" ftp://server.com/
编辑 @asmaier指出,请注意,即使
-r要进行递归,它的默认最大级别也为5:
-r --recursiveTurn on recursive retrieving. -l depth --level=depthSpecify recursion maximum depth level depth. The defaultmaximum depth is 5.
如果您不想错过子目录,最好使用镜像选项
-m:
-m --mirrorTurn on options suitable for mirroring. This option turns onrecursion and time-stamping, sets infinite
recursion depth and keeps FTP directory listings. It is
currently equivalent to -r -N -l inf
–no-remove-listing.



