Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/selkhateeb/hardlink
a simple command-line utility that implements hardlinks on Mac OsX
https://github.com/selkhateeb/hardlink
Last synced: 3 months ago
JSON representation
a simple command-line utility that implements hardlinks on Mac OsX
- Host: GitHub
- URL: https://github.com/selkhateeb/hardlink
- Owner: selkhateeb
- Created: 2011-02-25T14:46:36.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2017-10-05T14:00:46.000Z (over 7 years ago)
- Last Synced: 2024-08-01T02:26:34.925Z (6 months ago)
- Language: C
- Homepage:
- Size: 20.5 KB
- Stars: 482
- Watchers: 26
- Forks: 45
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hardlink-osx
A simple command-line utility that implements directory hardlinks on Mac OSXto 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](http://stackoverflow.com/questions/80875/what-is-the-bash-command-to-create-a-hardlink-to-a-directory-in-os-x)
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](https://developer.apple.com/technologies/mac/#xcode) command line tools installed to use `make` command## Installation
### Using Homebrew
After installing [homebrew](http://brew.sh/), 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
```