2.2. Inodes sysv [493]). As their name implies, (Make web site)
2.2. Inodes sysv [493]). As their name implies, their purpose is to link files in a symbolic way, which means that they are files whose content is the path to a different file. They may not point to an existing file. They are very frequently called soft links, and such files are identified by the letter l. 4. Named pipes: in case you were wondering, yes, these are very similar to pipes used in shell commands, but with the difference that these actually have names. However they are very rare and it’s not likely that you will see one during your journey into the file tree. Such files are identified by the letter p. See Section 4, Anonymous Pipes and Named Pipes [413]. 5. Sockets: this is the file type for all network connections, but only a few of them have names. What’s more, there are different types of sockets and only one can be linked, but this is way beyond the scope of this book. Such files are identified by the letter s. Here is a sample of each file: $ ls -l /dev/null /dev/sda /etc/rc.d/rc3.d/S20random /proc/554/maps /tmp/ssh-queen/ssh-510-agent crw-rw-rw-1 root root 1, 3 May 5 1998 /dev/null brw-rw—-1 root disk 8, 0 May 5 1998 /dev/sda lrwxrwxrwx 1 root root 16 Dec 9 19:12 /etc/rc.d/rc3.d/ S20random -> ../init.d/random* pr–r–r–1 queen queen 0 Dec 10 20:23 /proc/554/maps| srwx——1 queen queen 0 Dec 10 20:08 /tmp/ssh-queen/ ssh-510-agent= $ 2.2. Inodes Inodes are, along with the Everything Is a File paradigm, a fundamental part of any UNIX file system. The word inode is short for Information NODE . Inodes are stored on disk in an inode table. They exist for all types of files which may be stored on a file system, including directories, named pipes, character-mode files and so on. Which leads to this other famous sentence: The inode is the file . Inodes are how UNIX identifies a file in a unique way. No, you didn’t misread that: in UNIX, you do not identify a file by its name, but by 1 its inode number. The reason for this is that the same file may have several names, Important: note that inode numbers are unique per file system, which means that an inode with the same number can exist on another file system. This leads to the difference between on-disk inodes and in- memory inodes. While two on-disk inodes may have the same number if they are on two different file