Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ssh 如何使用Bitvise sftpc.exe镜像目录_Ssh_Sftp - Fatal编程技术网

Ssh 如何使用Bitvise sftpc.exe镜像目录

Ssh 如何使用Bitvise sftpc.exe镜像目录,ssh,sftp,Ssh,Sftp,Bitvise SSH客户端声明v8.15支持目录镜像: 图形化SSH客户端和sftpc现在支持递归目录镜像。目录及其所有子目录和文件可以在上载或下载方向上同步 我可以在GUI中找到它,但找不到如何使用sftpc.exe。sftpc.exe-help中没有提到镜像 如何从命令行执行目录镜像?您指出了sftpc中一个切题的设计问题:获取SFTP命令的帮助需要您以交互方式使用sftpc并连接到服务器。然后,您可以从交互式提示获取帮助 这很不方便,所以我打开了一个功能请求,让我们也可以从命令行获得交互

Bitvise SSH客户端声明v8.15支持目录镜像:

图形化SSH客户端和sftpc现在支持递归目录镜像。目录及其所有子目录和文件可以在上载或下载方向上同步

我可以在GUI中找到它,但找不到如何使用sftpc.exe。
sftpc.exe-help
中没有提到镜像


如何从命令行执行目录镜像?

您指出了sftpc中一个切题的设计问题:获取SFTP命令的帮助需要您以交互方式使用sftpc并连接到服务器。然后,您可以从交互式提示获取帮助

这很不方便,所以我打开了一个功能请求,让我们也可以从命令行获得交互式帮助

您要查找的帮助文本如下-对于
put
命令:

sftp> help put
USAGE: put local-path [remote-path] [-bg | -fg] [-s] [-o] [-r]
           [-f] [-noTime] [-m=mode] [-dm=mode] [-mirror [-erase]]
           [-b | -lf | -std | -tlf | -t]
DESCRIPTION: Upload file.
PARAMETERS:
 -bg      Start (queue) upload in background.
 -fg      Start upload in foreground.
 -s       Include subdirectories (recursive).
 -r       Synchronize file content. If synchronization is not available,
          resume existing incomplete files using a heuristic resume.
          Heuristic resume MAY result in an inconsistent destination file
          if the destination file content has been modified in the middle.
 -o       Synchronize file content. If synchronization is not available,
          force existing file to be overwritten. If -r is also specified,
          heuristic resume is tried first.
 -del     Remove local file after successful upload.
 -f       Assume remote-path is a file (not a directory)
 -noTime  Do not synchronize file modification times.
 -m=mode  Set the access mode for remote files to 'mode'.
 -dm=mode Set the access mode for new remote directories to 'mode'.
          If directory already exists, access mode will not be changed.
 -mirror  Mirror local-path to remote-path. Local files that do not exist
          remotely will be uploaded. Remote files that are different than
          their local versions will be overwritten.
 -erase   With -mirror, erase remote files that are not present locally.

FILE TRANSFER MODE - if present, overrides mode selected with "type":
 -b       Upload files as binary; no conversions.
 -lf      Auto-detect text files. In text files, replace CRLF with LF.
          Binary files are unaffected.
 -std     Auto-detect text files. Upload text files using the SFTP v4+ text
          file transfer mechanism. Binary files are unaffected. Not
          available when SFTP version 3 or lower is in use.
 -tlf     Upload all files as textual. Replace all CRLF bytes with LF.
 -t       Upload all files using the SFTP v4+ text file transfer mechanism.
          Not available when SFTP version 3 or lower is in use.
sftp> help get
USAGE: get remote-path [local-path] [-bg | -fg] [-s] [-o] [-r]
           [-f] [-noTime] [-lit] [-mirror [-erase]]
           [-b | -lf | -std | -tlf | -t]
DESCRIPTION: Download file.
PARAMETERS:
 -bg     Start (queue) download in background.
 -fg     Start download in foreground.
 -s      Include subdirectories (recursive).
 -r      Synchronize file content. If synchronization is not available,
         resume existing incomplete files using a heuristic resume.
         Heuristic resume MAY result in an inconsistent destination file
         if the destination file content has been modified in the middle.
 -o      Synchronize file content. If synchronization is not available,
         force existing file to be overwritten. If -r is also specified,
         heuristic resume is tried first.
 -del    Remove remote file after successful download.
 -f      Assume remote-path is a file (not a directory).
 -noTime Do not synchronize file modification times.
 -lit    Treat remote-path literally (not a wildcard pattern).
 -mirror Mirror remote-path to local-path. Remote files that do not exist
         locally will be downloaded. Local files that are different than
         their remote versions will be overwritten.
 -erase  With -mirror, erase local files that are not present remotely.

FILE TRANSFER MODE - if present, overrides mode selected with "type":
 -b      Download files as binary; no conversions.
 -lf     Auto-detect text files. In text files, replace LF with CRLF.
         Binary files are unaffected.
 -std    Behaves same as -lf when downloading. Not available when SFTP
         version 3 or lower is in use.
 -tlf    Download all files as textual. Replace all LF bytes with CRLF.
 -t      Download all files using the SFTP v4 text file transfer mechanism.
         Not available when SFTP version 3 or lower is in use.
对于
get
命令:

sftp> help put
USAGE: put local-path [remote-path] [-bg | -fg] [-s] [-o] [-r]
           [-f] [-noTime] [-m=mode] [-dm=mode] [-mirror [-erase]]
           [-b | -lf | -std | -tlf | -t]
DESCRIPTION: Upload file.
PARAMETERS:
 -bg      Start (queue) upload in background.
 -fg      Start upload in foreground.
 -s       Include subdirectories (recursive).
 -r       Synchronize file content. If synchronization is not available,
          resume existing incomplete files using a heuristic resume.
          Heuristic resume MAY result in an inconsistent destination file
          if the destination file content has been modified in the middle.
 -o       Synchronize file content. If synchronization is not available,
          force existing file to be overwritten. If -r is also specified,
          heuristic resume is tried first.
 -del     Remove local file after successful upload.
 -f       Assume remote-path is a file (not a directory)
 -noTime  Do not synchronize file modification times.
 -m=mode  Set the access mode for remote files to 'mode'.
 -dm=mode Set the access mode for new remote directories to 'mode'.
          If directory already exists, access mode will not be changed.
 -mirror  Mirror local-path to remote-path. Local files that do not exist
          remotely will be uploaded. Remote files that are different than
          their local versions will be overwritten.
 -erase   With -mirror, erase remote files that are not present locally.

FILE TRANSFER MODE - if present, overrides mode selected with "type":
 -b       Upload files as binary; no conversions.
 -lf      Auto-detect text files. In text files, replace CRLF with LF.
          Binary files are unaffected.
 -std     Auto-detect text files. Upload text files using the SFTP v4+ text
          file transfer mechanism. Binary files are unaffected. Not
          available when SFTP version 3 or lower is in use.
 -tlf     Upload all files as textual. Replace all CRLF bytes with LF.
 -t       Upload all files using the SFTP v4+ text file transfer mechanism.
          Not available when SFTP version 3 or lower is in use.
sftp> help get
USAGE: get remote-path [local-path] [-bg | -fg] [-s] [-o] [-r]
           [-f] [-noTime] [-lit] [-mirror [-erase]]
           [-b | -lf | -std | -tlf | -t]
DESCRIPTION: Download file.
PARAMETERS:
 -bg     Start (queue) download in background.
 -fg     Start download in foreground.
 -s      Include subdirectories (recursive).
 -r      Synchronize file content. If synchronization is not available,
         resume existing incomplete files using a heuristic resume.
         Heuristic resume MAY result in an inconsistent destination file
         if the destination file content has been modified in the middle.
 -o      Synchronize file content. If synchronization is not available,
         force existing file to be overwritten. If -r is also specified,
         heuristic resume is tried first.
 -del    Remove remote file after successful download.
 -f      Assume remote-path is a file (not a directory).
 -noTime Do not synchronize file modification times.
 -lit    Treat remote-path literally (not a wildcard pattern).
 -mirror Mirror remote-path to local-path. Remote files that do not exist
         locally will be downloaded. Local files that are different than
         their remote versions will be overwritten.
 -erase  With -mirror, erase local files that are not present remotely.

FILE TRANSFER MODE - if present, overrides mode selected with "type":
 -b      Download files as binary; no conversions.
 -lf     Auto-detect text files. In text files, replace LF with CRLF.
         Binary files are unaffected.
 -std    Behaves same as -lf when downloading. Not available when SFTP
         version 3 or lower is in use.
 -tlf    Download all files as textual. Replace all LF bytes with CRLF.
 -t      Download all files using the SFTP v4 text file transfer mechanism.
         Not available when SFTP version 3 or lower is in use.
我希望这有帮助

我通常不监视堆栈溢出,所以如果您需要我查看其他内容,请随时使用Bitvise打开一个支持案例来引起我的注意


我还建议使用最新的Bitvise SSH客户端版本。目前,这是8.35。在任何环境中使用它都是免费的,我们努力确保每个版本都是严格的升级,不会带来新的困难。我们希望没有理由留下来。:-)

谢谢你,丹尼斯。这很有帮助。不幸的是,我有一个后续问题:)当执行镜像时,有什么规则来确定本地和远程文件是相同的还是不同的?我正在做一个从Win10到Debian的
put-mirror
。sftpc每次都会上载每个文件。它永远不会确定文件是否相同,即使在背对背调用两次命令时也是如此。-镜像会尝试确保结果正确。它更喜欢使用SFTP v6逐块哈希功能进行同步。然而,在21世纪初,OpenSSH决定“640KB对任何人来说都应该足够了”,并且他们不会在v3之后实现SFTP。因此OpenSSH缺少SFTPV6文件哈希。在这种情况下,当使用镜像时,SSH客户端会重写,因为无法验证远程文件是否包含中间的更改。启发式恢复是可以支持的,但不是因为它会导致大型目录树上的不可见损坏,而大型目录树正是使用-mirror的预期用例。这是一个遗憾。我必须根据时间戳拼凑出自己的同步例程。:/谢谢你的帮助!Stack Overflow是一个关于编程和开发问题的网站。对于这个问题,您可能应该使用上的另一个站点。另请参见帮助中心中的。