문제

I puts all my dotfiles in $HOME/Dropbox/dotfiles

and make a hard link(I think it's the way to go, and for instance vim does't load soft link rc file)

ln $HOME/Dropbox/dotfiles/.vimrc $HOME/.vimrc

The problem is as long as I make change to the file in the dropbox directories, everything works as expected. But when I change the hard link file(which is $HOME/.vimrc), the original file changes accordingly, but dropbox won't sync!!(same as iCloud mobile document folder)

Any idea?

도움이 되었습니까?

해결책

Use soft links. Hard links make it so that Dropbox can't tell when the file is updated. This is because Dropbox doesn't poll the contents of every single file you have, it just looks at modification dates on the files located in your Dropbox.

This is exactly what I use for syncing my dot files with Dropbox:

$ ln -s ~/Dropbox/dotfiles/.vimrc .vimrc

and vim still loads the soft-linked vimrc file.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top