Symbolic Links
Cheat sheet · https://pcornel.dk/topic.php?topic=2676
Answer
A symbolic (soft) link is a small file that contains a path to another file or directory (ln -s target link). It can cross filesystems and point to directories, but breaks if the target moves.
Remember
Relative targets are resolved from the link's directory, not your current directory. ls -l shows the target; readlink -f the final resolved path. Permissions of the link itself do not matter — the target's do.
First checks
readlink -f <link>— resolved targetfind <dir> -xtype l— broken symbolic linksls -ld <path>— owner, permissions and typestat <path>— inode, links, size and timestampsdf -h <path>— filesystem and free spacefindmnt <path>— which mount the path is on
Verify in this order
link opened → kernel reads the stored path → resolves it (relative to the link's directory) → opens the target
Where it usually breaks
First mismatch in hardware/block device → kernel driver/mapper/RAID/LVM → filesystem → mount namespace/options → path permissions/MAC → consumer I/O; preserve identity/native diagnostic/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2676