A native macOS application for creating hard links between folders using the cp -al command. Built with SwiftUI and packaged as a complete .app bundle.
- Drag & Drop Interface: Simply drag folders into the app or use the file picker
- Multiple Source Folders: Link multiple source folders to one destination
- Visual Feedback: Real-time status updates and progress indicators
- Error Handling: Clear error messages if operations fail
- Native macOS Design: Built with SwiftUI for a modern, native experience
Hard links are references to the same data on disk. Unlike symbolic links, hard links:
- Don't break if the original file is moved or deleted
- Take up minimal additional disk space
- Appear as regular files/folders in Finder
- Are perfect for creating multiple access points to the same data
This app uses the cp -al command which creates hard links for all files in the source directory structure.
- macOS 13.0 or later
- Admin privileges may be required for some file operations
- Download the latest
Hard Linker.appfrom the releases page - Move it to your Applications folder
- Right-click and select "Open" the first time to bypass Gatekeeper
- Clone this repository
- Open Terminal in the project directory
- Run
swift build -c release - The built app is included in the repository as
Hard Linker.app
- Launch Hard Linker
- Add Source Folders:
- Drag folders into the "Source Folders" area, or
- Click the area and select folders using the file picker
- Set Destination:
- Drag a destination folder into the "Destination Folder" area, or
- Click the area and select a destination folder
- Create Links: Click "Create Hard Links" to start the process
- Monitor Progress: Watch the status messages for completion or errors
The app executes cp -al <source> <destination> for each source folder:
-apreserves file attributes and permissions-lcreates hard links instead of copying data
This creates a complete directory structure in the destination with hard links to all files from the source.
- Backup Solutions: Create space-efficient backups
- Development: Link project folders for different access points
- Media Organization: Create multiple organizational structures for the same files
- Testing: Create test environments without duplicating large datasets
- Language: Swift 5.9+
- Framework: SwiftUI
- Target: macOS 13.0+
- Architecture: Universal (Apple Silicon + Intel)
Hard Linker/
├── Package.swift # Swift Package Manager configuration
├── Sources/
│ └── HardLinkCreator/
│ └── HardLinkCreator.swift # Main application code
├── AppIcon.iconset/ # Source icon files
├── AppIcon.icns # Compiled app icon
└── Hard Linker.app/ # Complete app bundle
├── Contents/
│ ├── Info.plist # App metadata
│ ├── MacOS/
│ │ └── Hard Linker # Executable
│ └── Resources/
│ └── AppIcon.icns # App icon
To modify or extend the app:
- Edit
Sources/HardLinkCreator/HardLinkCreator.swift - Build with
swift build -c release - Update the app bundle:
cp .build/release/HardLinkCreator "Hard Linker.app/Contents/MacOS/Hard Linker"
Copyright © 2025 Josh Ferrara. All rights reserved.
Feel free to open issues or submit pull requests to improve the app!