Welcome to the Linux Foundation Forum!

Mistake in "Hard and Soft Links"?

Options

Hi All,

I think the bold part is not correct in
LFS207 - 21. LINUX FILESYSTEMS AND THE VFS

Hard and Soft Links
A directory file is a particular type of file that is used to associate file names and inodes. There are two ways to associate (or link) a file name with an inode:

Hard links point to an inode.​ They are made by using ln without an option. Two or more files can point to the same inode (hard link). All hard linked files have to be on the same filesystem. Changing the content of a hard linked file in one place may not change it in other places.
Soft (or symbolic) links point to a file name which has an associated inode. They are made by using ln with the -s option. Soft linked files may be on different filesystems. If the target does not yet exist or is not yet mounted, it can be dangling.

It should be: (corrected part in bold)

Hard links point to an inode.​ They are made by using ln without an option. Two or more files can point to the same inode (hard link). All hard linked files have to be on the same filesystem. If you modify the content of a hard linked file, the original file's content will change as well. This is because a hard link is simply another name for the same inode (data structure) on the file system, and any changes made to one hard link will be reflected in all other hard links to the same inode.
Soft (or symbolic) links point to a file name which has an associated inode. They are made by using ln with the -s option. Soft linked files may be on different filesystems. If the target does not yet exist or is not yet mounted, it can be dangling. Changing the content of a soft linked file in one place may not change it in other places, because symbolic links simply reference the original file by its path, rather than creating a new inode on the file system.

Thank you for checking.

Cheers,
Daniel Varsas

Comments

Categories

Upcoming Training