首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >递归比较Linux系统A上的根目录和Linux系统B上的根目录

问递归比较Linux系统A上的根目录和Linux系统B上的根目录
EN

Unix & Linux用户
提问于 2016-11-22 19:20:55
回答 2查看 129关注 0票数 0

我试图使用rsync和ssh来区分两个Linux系统上的所有文件,方法是使用-运行选项,这样它就不会同步任何文件/文件夹。我做错了什么?运行此命令时,我当前位于根目录中。

命令:

代码语言:javascript
复制
rsync --dry-run -v 'ssh -p 22' root@192.168.86.128:/

输出:

代码语言:javascript
复制
[root@localhost /]# rsync --dry-run -v 'ssh -p 22' root@192.168.86.128:/
The authenticity of host '192.168.86.128 (192.168.86.128)' can't be established.
RSA key fingerprint is 22:e5:15:2e:0b:69:5d:cd:63:84:83:61:b7:ce:19:56.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.86.128' (RSA) to the list of known hosts.
root@192.168.86.128's password:
rsync: link_stat "/ssh -p 22" failed: No such file or directory (2)

sent 16 bytes  received 12 bytes  1.70 bytes/sec
total size is 0  speedup is 0.00 (DRY RUN)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6]
[root@localhost /]#
EN

回答 2

Unix & Linux用户

发布于 2016-11-22 19:28:27

这在将系统A与系统B进行比较时起作用。

代码语言:javascript
复制
rsync --dry-run -r root@192.168.86.129:/ /

在将系统B与系统A进行比较时,这是有效的:

代码语言:javascript
复制
rsync --dry-run -r root@192.168.86.128:/ /
票数 0
EN

Unix & Linux用户

发布于 2016-11-24 10:47:09

梅尔德用友好的界面递归地比较文件夹。

票数 0
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/325245

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档