我如何构建一个终端命令来使用 wget 从 Media Temple (gs) 服务器下载文件夹?
我正在尝试在终端上使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 Mac 上使用
scp
来代替,它可能会工作得更好。scp -r [电子邮件受保护]:/文件夹/路径 /本地/路径
Use
scp
on the Mac instead, it will probably work much nicer.scp -r [email protected]:/folder/path /local/path