a simple command-line utility that implements hardlinks on Mac OsX
C Makefile
Switch branches/tags
Nothing to show
Latest commit 8436f1b Aug 24, 2017 @jamespayne jamespayne committed with selkhateeb Remove unused bullet point
Permalink
Failed to load latest commit information.
.gitignore Ignore compiled hln Aug 24, 2017
Makefile Fixing Makefile for 10.8 Oct 29, 2014
README.md Remove unused bullet point Aug 24, 2017
hln.c Behave more like the built-in ln May 18, 2016

README.md

hardlink-osx

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

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

Motivation

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 the stackoverflow question here and decided to create a lib out if it that anybody can use.

A note about the the hln binary name:

The binary is named hln due to a naming conflict. It's also just easier to type and does not conflict with any other system I have checked.

Requirements

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

Installation

Using Homebrew

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

  • brew install hardlink-osx

Manually compiling

  • git clone https://github.com/selkhateeb/hardlink.git
  • cd hardlink
  • make
  • [sudo] make install

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

Usage

To create a hard link:

  • hln source destination

To remove the link:

  • hln -u destination

Limitations

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