加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

Gitbash中的rsync(cwrsync) – 源和目标不能都是远程的. [Window

发布时间:2020-12-13 16:59:31 所属栏目:Linux 来源:网络整理
导读:我试图在 Windows 7中使用 Git Bash将本地路径同步到另一个驱动器.我下载了cwRsync并将文件复制到我的Git bash bin目录.我可以运行rsync但是以下命令给我带来了问题 rsync -av /c/00-dev/05-batch /f/RSYNC/ The source and destination cannot both be remo
我试图在 Windows 7中使用 Git Bash将本地路径同步到另一个驱动器.我下载了cwRsync并将文件复制到我的Git bash bin目录.我可以运行rsync但是以下命令给我带来了问题

rsync -av /c/00-dev/05-batch /f/RSYNC/
The source and destination cannot both be remote.
rsync error: syntax or usage error (code 1) at main.c(1135) [receiver=3.0.6]

两条路径都是正确的,但不会同步.

解决方法

解决方法:使用相对路径cd到/ c和rsync.

这样可行:

cd /c
touch temp/test.txt
rsync temp/test.txt temp/test2.txt

虽然这不是,即使你cd到/ c:

$rsync /c/temp/test.txt /c/temp/test2.txt
The source and destination cannot both be remote.

使用git 2.9.0.windows.1附带的Git Bash进行测试.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读