Hi,
I would like to know if it is possible to link files to one another. If so how do I go about doing so or better may you point me to some reading material on how it can be done.
Many thanks
Hi,
I would like to know if it is possible to link files to one another. If so how do I go about doing so or better may you point me to some reading material on how it can be done.
Many thanks
Thread note for and future readers: macOS supports three common ways to “link” files — Finder aliases (GUI), symbolic links (POSIX symlinks) and hard links — each with different behavior. asked for specifics earlier; below are the practical differences, how to create them, and common gotchas.
Finder alias
Right-click an item in Finder and choose “Make Alias” (or use File > Make Alias). Finder aliases are Mac-native shortcuts that try to find the target even after renames or moves within the same volume. They’re convenient on the desktop or in the Dock, but they are different from POSIX symlinks and some command-line tools won’t resolve them automatically.
Symbolic links vs hard links (Terminal)
Create a symbolic link (flexible, can cross volumes):
ln -s /path/to/target /path/to/linkname Create a hard link (another name for the same file; same inode, must be on the same filesystem and applies to files only):
ln /path/to/target /path/to/linkname Check a symlink target and listing:
readlink /path/to/linkname
ls -l /path/to/linkname
ls -li /path/to/target /path/to/linkname # compare inode numbers for hard links Key cautions and troubleshooting
find /path -type l -exec test ! -e {} \; -print If remembers which method solved the original problem, a short note here would help others choosing the right approach.
Jump to Post— mesamb1 0Can you be a little more specific about what you are trying to do?
Can you be a little more specific about what you are trying to do?
sorry solved this a long time ago.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.