Tuesday, 7 March 2017

Creating a hard link to a directory/folder in mac os

Install Piffle: 

   brew install coreutils

The you can just create the link: 

    sudo gln -d existing_dir new_hard_link

Deleting is a different story: if you go about it the usual way to delete directories, you'll delete the contents. So you must "unlink" the directory:
    unlink  new_hard_link