我有一个目录?/ x7 / music / sfx.
?/ x7 / music的根目录中有一些文件和文件夹.
我只需要同步sfx文件夹并忽略音乐中的任何其他内容.
我尝试过很多变种,但都错了.
ignore = Name music/*
ignorenot = Regex music/sfx/.* (OR just *)
不起作用.
我期待用类似的东西
ignore = Name music/*^/
解决方法
我不熟悉unison,但要忽略除了sfx之外的一切你可以使用
ignore = Regex /root/path/to/music/.*
ignorenot Regex /root/path/to/music/sfx/.*
Documentation Source
There is also an ignorenot preference,which specifies a set of patterns for paths that should not be ignored,even if they match an ignore pattern. However,the interaction of these two sets of patterns can be a little tricky. Here is exactly how it works:
-
Unison starts detecting updates from the root of the replicas—i.e.,from the empty path. If the empty path matches an ignore pattern and does not match an ignorenot pattern,then the whole replica will be ignored. (For this reason,it is not a good idea to include Name * as an ignore pattern. If you want to ignore everything except a certain set of files,use Name ?*. )
-
If the root is a directory,Unison continues looking for updates in all the immediate children of the root. Again,if the name of some child matches an ignore pattern and does not match an ignorenot pattern,then this whole path including everything below it will be ignored.
-
If any of the non-ignored children are directories,then the process continues recursively.
(编辑:李大同)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|