Hardlink manager
Utility for managing hardlinks on macOS
Purpose
hardlink
is a useful tool for creating directory hardlinks. However, it can be difficult to remember where all the hardlinks exist for a certain directory, if any. Also, there is a risk of removing a hardlinked directory with rm -rf
and all other linked directories will disappear at once 🔥.
hardlink-manager
is a wrapper that stores all hardlink locations in a file called .hardlinks
at the root of the linked directory. When no more hardlinks exist, the file is removed.
This way, it's easy to know if/when a certain directory is hardlinked, and to what locations. The file .hardlinks
should be added to .gitignore
.
Requirement
hardlink
should be installed and available as command hln
brew install hardlink-osx
Install
npm install hardlink-manager -g
Usage
Create hardlink
hlnm [source] [destination]
If destination is not specified, the original folder name will be used.
Remove hardlink
hlnm -u [destination]
List all hardlinks under current directory
hlnm -l