Unison 剖析根/路径问题

Unison 剖析根/路径问题

我正在尝试使用 unison 将两个文件夹相互同步(一个本地,一个远程)。

如果我使用像这样的标准命令......

unison -times /Volumes/My\ HD/Work ssh://myremoteserver//volume1/My\ Files/Work

... 它起作用了。我知道它起作用了,因为它显示了所有需要从 x 传输到 y 的文件。

但是如果我像这样为此功能创建一个配置文件......

# Roots of the synchronization
root = /Volumes/My\ HD
root = ssh://myremoteserver//volume1/My\ Files

# Paths
path = Work

# Some regexps specifying names and paths to ignore
ignore = Path @eaDir
ignore = Name *.DS_Store

log = true
times = true

这会不断出现此消息......

Looking for changes
Warning: No archive files were found for these roots, whose canonical names are:
    /Volumes/My\ HD
    //Server//volume1/My\ Files
This can happen either
because this is the first time you have synchronized these roots, 
or because you have upgraded Unison to a new version with a different
archive format.  

If you see this message repeatedly, it may be because one of your machines
is getting its address from DHCP, which is causing its host name to change
between synchronizations.  See the documentation for the UNISONLOCALHOSTNAME
environment variable for advice on how to correct this.

..然后说没有什么可做的改变。

我知道上面提到的有关 DHCP 的提示,我不确定这是否适用于我,因为使用单个命令ssh://myremoteserver有效,只有将其包含在 .profile 中时才会成为问题。

答案1

这是因为我习惯于\转义空格,但 .profiles 不需要这些空格

相关内容