filesystems

How symbolic and hard links work on Unix

How symbolic and hard links work on Unix

Unix file systems support 2 kinds of link: hard links and symbolic links. Both come from the same command, ln, but they work in very different ways. This post explains how each kind works. It then covers where Linux and the BSDs, including macOS, disagree.

Inodes first

A file on disk is not really a name. It is an inode: a numbered record that holds the file’s metadata and points to its data blocks. The inode stores the owner, the permissions, the timestamps, and the size. It does not store the file name.

Read More