Preserving aliases over OSX ssh rsync

那年仲夏 提交于 2019-12-10 10:36:21

问题


I'm having a devil of a time preserving aliases with rsync over ssh on OSX (Yosemite)

rsync -av -e ssh me@N.N.N.N:/Users/me/stuff/ /Users/me/stuff

does not preserve aliases. It makes an alias on the destination... but it doesn't point to the original file (on the destination). Firing up a Finder window, turning on File Sharing on the source, and drag and dropping preserves aliases, but that's the only way I've figured out how to do this so far, and I would prefer a non-GUI solution. Would something besides rsync work over ssh?

I've tried both native OSX rsync as well as Homebrew's.

Thanks super in advance!


回答1:


Use the -E option. Alias files include resource forks. The -E option is documented as:

  -E, --extended-attributes
          Apple specific option  to  copy  extended  attributes,  resource
          forks,  and  ACLs.   Requires at least Mac OS X 10.4 or suitably
          patched rsync.


来源:https://stackoverflow.com/questions/32428806/preserving-aliases-over-osx-ssh-rsync

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!