小编Imr*_*ran的帖子

如何在 Unison 同步中忽略文件夹及其子目录

我使用Unison在我的机器上同步网站项目,在我的一台机器中,我想避免同步(双向)我观看的文件夹中包含的某些文件夹:

/vendor
/node_modules
/storage/debugbar
/staroge/framework
Run Code Online (Sandbox Code Playgroud)

这是我用来执行同步的 .prf 文件的配置文件,您可以看到文件夹位于忽略路径行中。

# Roots of the synchronization
root = /Volumes/Data HD
root = ssh://Server//volume1/My Files

# Paths
path = Sites

# Some regexps specifying names and paths to ignore
ignore = Name */@eaDir
ignore = Name */_notes
ignore = Name .DS_Store
ignore = Name SyncToy_*.dat
ignore = Path */Archives
ignore = Path */tools
ignore = Name *.sublime*

# Ignore laravel composer and npm folders
ignore = Path {Sites/CRMJobs/node_modules}
ignore = Path {Sites/Loot/node_modules} …
Run Code Online (Sandbox Code Playgroud)

linux sync unison

6
推荐指数
1
解决办法
8832
查看次数

标签 统计

linux ×1

sync ×1

unison ×1