Skip to content


Subversion checkout URL

You can clone with
Download ZIP
a simple command-line utility that implements hardlinks on Mac OsX
C Shell
Branch: master
Failed to load latest commit information.
Makefile Fixing Makefile for 10.8 Updated brew install command in README.
hln.c Updating files again!


a simple command-line utility that implements directory hardlinks on Mac OSX

to link: hln source destination
to unlink: hln -u destination


I was trying to patch a third-party library and make the files available in our code directory without having to copy the files every time I patch it.

I got the idea from some stackoverflow questions.. and decided to create a lib out if it that everybody can use


the binary is named hln due to the naming conflict previously mentioned, as well as it is easier to type and does not conflict with any system I have checked.


  • You need xCode command line tools installed to use make command


Using Homebrew

After installing homebrew, you can simply issue this command in your terminal and hardlink will automatically install:

  • brew install hardlink-osx

Manually compiling

Note: in case you get error directory /usr/local/bin does not exist, just copy hardlink app into /usr/bin instead


To create a hard link:

  • hln source destination

To remove the link:

  • hln -u destination


Hardlink can not be created under the same directory root. If you try to hln source directory to target directory under the same root you will get an error.

operation not permitted

to avoid that you should create additonal directory level

- /directory_root/
   |-  /source_directory
   |-  /parent_directory/
         |- target_directory
Something went wrong with that request. Please try again.