![]() 1 egdoc egdoc 18 Jan 28 13:45 /home/egdoc/.bash_logout The count of hard links associated with an inode is reported in the output of the ls command when it is called with the -l option: $ ls -l ~/.bash_logout When the count of hard links for an inode reaches 0, the inode itself is deleted and so the referenced blocks on the disk become usable by the operating system (the actual data is not deleted, and can be sometimes recovered, unless it is overwritten by new data). Hard links have two major limitations: they don’t work across filesystems and cannot be used for directories. All files have (of course) at least one hard link. ![]() What we commonly call “file names” are just human-friendly references to inodes established inside directories.Ī directory can contain more then one reference to the same inode: those references are what we call hard_links. An inode is a data structure on the filesystem which contains various information about a file or a directory (which, by the way, is just a “special” kind of file), such as its permissions and the location of the hard disk blocks containing the actual data.Īt this point you may think the name of a file is also “stored” into its inode: this is not the case. To understand how hard_links work, we must focus on the concept of inode. ![]() The ln command generates hard links by default if we want to create symbolic links we must invoke it with the -s option (short for -symbolic). On Unix-based systems like Linux we have two types of “links”: hard and symbolic. Before we proceed further, and learn how to create incremental backups with rsync, we should take some time to clearly grasp the difference between symbolic and hard, links, since the latter will have a crucial role in our implementation (you can skip this part if it sounds obvious to you).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |