Changes

Jump to: navigation, search

Tutorial8: Links / Process Management

33 bytes added, 17:55, 5 February 2020
Linking Files
'''inode (index) Number of a File:'''
<table align="right"><tr valign="top"><td>[[Image:inode-number-1.png|thumb|right|300px|Each inode stores the attributes and disk block locations of the object's data.<br>(Image licensed under [https://creativecommons.org/licenses/by-sa/3.0/ cc])]]</td><td>[[Image:inode-number-2.png|thumb|right|360px|The '''inode number''' is like a '''finger-print''', and usually is considered to be '''unique''' for each file on the Unix / Linux file system.]]</td></tr></table>
''The inode (index node) is a data structure in a Unix-style file system that describes a file-system object such as a file or a directory. Each inode stores the attributes and disk block locations of the object's data. File-system object attributes may include metadata (times of last change, access, modification), as well as owner and permission data.''
The '''inode number''' is like a '''finger-print''', and usually is considered to be '''unique''' for each file on the Unix / Linux file system.<br>Referring to the diagram on the far right, issuing the '''ls''' command with the '''-i''' option<br>displays the inode number for each file. You can see that <u>each</u> file<br>(whether it is a directory or regular file) has its own unique inode number.
A '''Hard link''' is a reference to the physical data on a file system.
'''Advantages''' of hard links are that if one hard link remains (even if original file has been removed), the data in that hard linked file is NOT lost, a as well as hard links linked files will automatically change when a change be updated to that of the original file or hard links occur since they share the same '''i-node number'''<br>and therefore are considered to be the same file in the Unix/Linux OS treats them all as the same filesystem.
'''Disadvantages''' of hard links are that they take-up extra space,<br>you cannot hard link directory filesdirectories, and you cannot hard link files from other Unix/Linux servers<br>(since the inode number may already be used by the other Unix/Linux server).
13,420
edits

Navigation menu