Is there a feature on OS X that does the same as mklink under Windows 7? It can create symbolic links and hard links.

I have just read about this tool to have Dropbox sync an application folder by combining it with mklink on Windows 7, using a hard link:


How can I achieve this on OS X?

2 Answers 2


Open /Applications/Utilities/Terminal.app. Run ln for a short description and man ln for the documentation.


ln existing.txt new.txt

For folders, create a symbolic link using ln -s:

ln -s existing new

As per Scott's comment, these symbolic links work with Dropbox on OS X

Hardlinks on folders are possible but difficult, and insanely dangerous if you mess it up (they don't like recursion).

  • 2
    Use a symlink to sync folders outside your Dropbox on Mac OS X (and Linux for that matter). It works fine, and you avoid the whole can of worms that hard linking directories is. See wiki.dropbox.com/TipsAndTricks/SyncOtherFolders
    – Scott
    Jan 11, 2011 at 16:59

Not so Equivalent like mklink.

ls -s /tmp/a /tmp/b

If I open project using CLion and select /tmp/b, I'll see it finally recognized as /tmp/a. The title bar of the window displays the path it "think".

While under windows, mklink /j c:\b c:\a will indeed make all applications think files in 'c:\b' not 'c:\a'.

Use CLion do the same thing: Open project in c:\b, the title bar will display "c:\b...".

This is the desired behavior a symbol link should be.

However, macOS cannot do this correctly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.