Inode = the real file
The inode stores file metadata (size, timestamps, permissions, disk blocks). Directory entries (names) point to inodes; data lives behind the inode.
Solaris · Link
Solaris · Lesson 14
Hard and soft link concepts in Solaris. inode behavior explained. Practical use cases. Troubleshoot broken links.
A “link” is simply another name or pointer to a file. Solaris, like other Unix systems, supports hard links and soft (symbolic) links. Both help you avoid copying data and allow multiple paths to refer to the same content.
To really understand the difference, you must think in terms of inodes — the internal structures that store metadata and point to file data on disk.
The inode stores file metadata (size, timestamps, permissions, disk blocks). Directory entries (names) point to inodes; data lives behind the inode.
A hard link is another directory entry pointing to the same inode. Same inode number, same data; only the name is different.
A soft (symbolic) link is a small file that stores a path to another file or directory. It has its own inode and can break if the target path disappears.
Work through these examples in your lab. Watch the inode numbers and link counts carefully — they tell the real story behind the names.
Hard links are additional directory entries pointing to the same inode (same underlying file) on the same filesystem.
Soft links are separate files that store a path to the target. They have their own inode and can span filesystems.
When you remove the original name, hard links still work (same inode). Soft links become broken pointers.
The file data on disk is removed only when the last hard link is deleted and no process is using it.
Hard links cannot cross filesystems and are normally not used for directories. Soft links have more flexibility but can break.
/var/www/current → release-123).find /path -xtype l) to avoid surprises.Understanding inodes and links will help you a lot when working with backups, NFS mounts, ZFS snapshots and even package management.