简体   繁体   中英

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.

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. 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"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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