Soft Link
- Tags
- comp-arch
Is a file that points to another file on the file-system. Symlinks are created with a special bit so when the OS attempts to interact with the symlink, most of those operations are done on the file pointed to by the symlink.
You can create a symlink using the symlink system-call. Some advantages of symlinks over hardlinks is that they can:
- Refer to files that don't exist yet.
- Point to directories as well as regular files.
- Point to files (and directories) outside the current file-system.
The key disadvantage of symlinks over hard-links is that symlinks are slower. Each call to open for a symlink requires re-evaluating the path pointed to be the symlink, opening it and then reading it.