I use inotify-tools
and unison
to synchronize folders between machines.
Because I have a large folder to synchronize, I just simply write an inotifywait
script to do the job automatically.
Is it sensible to let inotifywait
to monitor the subdirectories of the large folder to gain a better performance?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You should get better performance if you ditch inotify-tools
and just use unison's native support for watching your folders for changes. By using inotify-tools
and then calling unison
when a change occurs, unison
has to "re-find" the change before it syncs. You could instead add the line repeat = watch
to your unison profile and unison
will run continually and sync whenever there is a change. It detects the change with its own file-watcher utility unison-fsmonitor
that communicates directly with unison.
For more information, check out the latest changelog for unison 2.48.3 with major changes to unison-fsmonitor
.