如何在Linux上通过FTP递归下载文件夹 [英] How to recursively download a folder via FTP on Linux

查看:537
本文介绍了如何在Linux上通过FTP递归下载文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用命令行ftp客户端ftp文件夹,但到目前为止,我只能使用'get'获取单个文件。

I'm trying to ftp a folder using the command line ftp client, but so far I've only been able to use 'get' to get individual files.

推荐答案

你可以依靠通常处理ftp的wget获得正确的(至少在我自己的经验)。例如:

You could rely on wget which usually handles ftp get properly (at least in my own experience). For example:

wget -r ftp://user:pass@server.com/

您也可以使用适用于镜像的 -m 。它目前相当于 -r -N -l inf

You can also use -m which is suitable for mirroring. It is currently equivalent to -r -N -l inf.

如果您在凭证详细信息,可以指定 - user - password 参数以使其正常工作。具有特定字符的自定义登录示例:

If you've some special characters in the credential details, you can specify the --user and --password arguments to get it to work. Example with custom login with specific characters:

wget -r --user="user@login" --password="Pa$$wo|^D" ftp://server.com/

这篇关于如何在Linux上通过FTP递归下载文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆