我如何构建一个终端命令来使用 wget 从 Media Temple (gs) 服务器下载文件夹?

发布于 2024-08-29 22:30:04 字数 1336 浏览 1 评论 0原文

我正在尝试在终端上使用 wget 下载一个文件夹(如果这很重要的话,我使用的是 Mac),因为我的 ftp 客户端很糟糕并且不断超时。它不会长时间保持连接。所以我想知道是否可以使用 wget 通过 ftp 协议连接到服务器来下载有问题的目录。我在互联网上搜索了这一点,并尝试编写该命令,但它一直失败。因此,假设以下内容:

ftp 用户名是: [email protected] ftp主机是:ftp.s12345.gridserver.com ftp 密码是: somepassword

我尝试通过以下方式编写命令:

wget -r ftp://[email protected]:[email protected]/path/to/desired/folder/

wget -r ftp://serveradmin:[email protected]/path/to/desired/folder/

当我尝试第一种方式时,我收到此错误:

 Bad port number.

当我尝试第二种方式时,我会更进一步,但我收到此错误:

Resolving s12345.gridserver.com... 71.46.226.79
Connecting to s12345.gridserver.com|71.46.226.79|:21... connected.
Logging in as serveradmin ... 
Login incorrect.

我能做什么错误的?

I'm trying to download a folder using wget on the Terminal (I'm usin a Mac if that matters) because my ftp client sucks and keeps timing out. It doesn't stay connected for long. So I was wondering if I could use wget to connect via ftp protocol to the server to download the directory in question. I have searched around in the internet for this and have attempted to write the command but it keeps failing. So assuming the following:

ftp username is: [email protected]
ftp host is: ftp.s12345.gridserver.com
ftp password is: somepassword

I have tried to write the command in the following ways:

wget -r ftp://[email protected]:[email protected]/path/to/desired/folder/

wget -r ftp://serveradmin:[email protected]/path/to/desired/folder/

When I try the first way I get this error:

 Bad port number.

When I try the second way I get a little further but I get this error:

Resolving s12345.gridserver.com... 71.46.226.79
Connecting to s12345.gridserver.com|71.46.226.79|:21... connected.
Logging in as serveradmin ... 
Login incorrect.

What could I be doing wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

痕至 2024-09-05 22:30:04

在 Mac 上使用 scp 来代替,它可能会工作得更好。

scp -r [电子邮件受保护]:/文件夹/路径 /本地/路径

Use scp on the Mac instead, it will probably work much nicer.

scp -r [email protected]:/folder/path /local/path

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文