Changes

Jump to: navigation, search

Tutorial8: Links / Process Management

52 bytes removed, 09:13, 2 September 2020
Linking Files
<table align="right"><tr valign="top"><td>[[Image:hard-link-1.png|thumb|right|300px|(Image licensed under [https://creativecommons.org/licenses/by-sa/3.0/ cc])<br>Image manipulated by author]]]</td><td>[[Image:inode-number-3.png|thumb|right|500px|'''Hard links''' share the '''same inode number'''. Hard links are very good for '''backup''' purposes.]]</td></tr></table>
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''', as well as hard linked files will automatically be updated to that of the original file since they share the same '''i-node number'''<br>and therefore are considered to be the same file in the Unix/Linux file system.
'''Disadvantages''' of hard links are that they '''take-up extra space''',<br>you cannot hard link directories, 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).
<table align="right"><tr valign="top"><td>[[Image:symbolic-link-1.png|thumb|right|300px|(Image licensed under [https://creativecommons.org/licenses/by-sa/3.0/ cc])]]</td><td>[[Image:inode-number-4.png|thumb|right|500px|Symbolic links do NOT share the same i-node number. '''Symbolic links''' are very good for short-cuts to other files (including directories) but NOT for backup purposes.]]</td></tr></table>
A '''Symbolic Link''' is an '''indirect pointer ''' to a file and are also known as '''soft link''' or '''symlink'''.
'''Advantages''' of symbolic links are that they are '''shortcuts ''' to other files, where the symbolic link only contains the pathname to the original file, you can create symbolic links<br>on different Unix/Linux servers, and that you can create symbolic links for directories.
'''Disadvantages''' of symbolic links are that they are NOT good for backup purposes<br>since a symbolic link can point to a nonexistent file (referred to as a "broken link").
13,420
edits

Navigation menu