Finder iCloud – How to Hard Link ‘~/Library/Mobile Documents/com~apple~CloudDocs’ to ~/iCloud

data synchronizationdocuments-in-the-cloudfindericloud

Is it possible to do this at all? I've tried the following command:

ln /Users/Rowan/Library/Mobile\ Documents/com~apple~CloudDocs/Documents /Users/Rowan/iCloud

which results in:

ln: /Users/Rowan/Library/Mobile Documents/com~apple~CloudDocs/Documents: Is a directory

I can't seem to find how to add an argument to ln in order to 'allow' directories.

Best Answer

ln(1) on OS X does not support folder hard links. A symlink would work fine instead.

ln -s /Users/Rowan/Library/Mobile\ Documents/com~apple~CloudDocs/Documents /Users/Rowan/iCloud

If you really want a hard link, you can install coreutils with Homebrew and use

gln -d /Users/Rowan/Library/Mobile\ Documents/com~apple~CloudDocs/Documents /Users/Rowan/iCloud