Filesystem Links
Linux offer shortcut function through links.
A link is a reference or a pointer to a file or directory somewhere on the file system.
There are two types of links: hard and soft (symbolic) links.
ln
ln
- make links between files
By default
ln
creates a Hard Link.
Hard Link
A hard link points to the physical location of the file on storage.
If the original file is moved or deleted a hard link continues to work. The file will be completely deleted when there are no hard links to the file.
Hard links are older and less frequently uses.
Cannot create directory hard link.
Soft - Symbolic Link
A symbolic link references the file or directory on the file system, not on storage.
If the resource is moved or deleted from the file system, the symbolic link will not work.
Always use absolute paths for soft links targets.
Soft links can cross file systems.
Directory soft links can be created.
There are many internal system symbolic links.
Last updated