What is link?
Link is connection between two file
Here there are two links are there Soft link and hard link
Hard link syntax
#ln
[root@localhost /]# ln rhelfile /var/
Soft Link syntax
#ln –s
Soft link is also called symbolic link, sym link
Difference between Hard link and Soft link
Hard link
1)Links have the original source content.
2)If we delete original file we can get back the data
3)Link inode values are same (what is inode)
[root@localhost /]# ls -i rhelfile
32771 rhelfile
[root@localhost var]# ls -i rhelfile
32771 rhelfile
4)Hard link we can link only file
Link the directory is not possible
[root@localhost ~]# ln rhel/ /var/
ln: `rhel/': hard link not allowed for directory
5)We cat not use hard link in Network File service
6) if the original file is edited it will reflected in the linked file
Soft Link
1) Link has the path of the source file.
2) If we delete the original file of link we can not get it back
#ls –i it will list out list of inode value of file
3) Soft link inode value is different ( what is inode)
4) Soft link we can create the link file and folder
5) Soft link we can use the Network file service
6) it is same like hard link if file is edited it will be reflected
0 comments:
Post a Comment