Two concepts:
- symbolic link a one file is a pointer or to another file.
- hard link two files share the same data and same inode .
how files are linked, how files are stored on a filesystem. A filesystem has three main:
superblock is contains information about the filesystem in general such as the number of inodes and data blocks.
inode table consists of several inodes and more important store information such as: the file
size, permissions etc.
Data block is data that make up the contents of the file.
The structure:
Hard link |
symbolic link |
To create hard link use ln command:
# ln existing-file target-file
To create symbolic link use ln command with -s option:
# ln -s link-to-file fileExamples ln command:
# ln file1 file2Copyright by: www.linuxoperatingsystem.info http://goo.gl/kMscJ4
# ln -s file3 file4
0 comments:
Post a Comment