简体   繁体   English

Linux Unison:忽略除多个文件之外的所有文件

[英]Linux Unison: ignore all except multiple files

I want to synchronize two computers that are similar and update just a few files.我想同步两台相似的电脑,只更新几个文件。 Therefore I would like to perform a Unison and ignore everything except a list of files in different paths.因此,我想执行 Unison 并忽略除不同路径中的文件列表之外的所有内容。

Something like:就像是:

# /usr/bin/unison-gtk /home/ ssh://root@192.168.0.199:22//home/ -ignore "Name *" -ignorenot "Name {config/text.cfg, Pictures/test.jpg, Desktop/test.mp3"

Or even better starting with root directory:或者从根目录开始更好:

# /usr/bin/unison-gtk / ssh://root@192.168.0.199:22// -ignore "Name *" -ignorenot "Name {/home/config/text.cfg, /home/Pictures/test.jpg, /usr/local/bin/test.sh"

The first ignore is exclude everything else so the ignorenot won't catch them.第一个忽略是排除其他所有内容,因此 ignorenot 不会捕获它们。 Any Help?有什么帮助吗? Can anyone help?任何人都可以帮忙吗? Nothing I have found is helping me.我没有发现任何东西对我有帮助。

Got the solution somewhere else.在其他地方得到了解决方案。 Using path multiple times is possible:可以多次使用路径:

/usr/bin/unison-gtk / ssh://root@192.168.0.100:22// -path home/config/text.cfg -path /home/Pictures/test.jpg -path /usr/local/bin/test.sh" /usr/bin/unison-gtk / ssh://root@192.168.0.100:22// -path home/config/text.cfg -path /home/Pictures/test.jpg -path /usr/local/bin/测试.sh"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM