下载或移动 SFTP 中的目录? -r 给出非法参数

Downloading or moving a directory in SFTP? -r gives an illegal argument

我的 sftp 服务器中有一个文件夹,我想下载或移动它。当我尝试重命名(移动它)时,出现以下错误 -

Couldn't rename file "/my/directory/<directory>" to "/my/directory/path/../directory/newname": Failure

传入 -r 也不起作用 -

get: Invalid flag -r

如何在不使用 -r 命令的情况下下载或移动这些目录?我没有升级 sftp 的能力。

谢谢

其实我喜欢用 WinSCP with wine, but since it's not the case try to use this command from http://linux.die.net/man/1/sftp 并检查它是否有效。

rename oldpath newpath

PS: 你不能使用 mv 来做到这一点

下载还是移动?

 get -r remote_directory

将目录下载到您的计算机。

 rename bla blub

是否重命名