Monday, July 21, 2014


How hard link differ from symlinks in Linux or Unix

Symbolic Link:
Symbolic Links also known as symlinks or soft links. It is a special file that points to another file
When you create a new file, an unused inode on the file system is allocated to it, Every file on a file system has an index node

Symbolic links cross the filesystem 
Symbolic links can link directories.
Hard Link:
A hard link allows you to set an additional name pointing to the same inode number from somewhere else on the same file system. 

Hard links cannot cross the filesystem
Hard links cannot link directories. 

You can create the Soft Link by In command with -s option 
You can create the Hard Link by In  command 
Hard Link
  •  File original and hardlink have the same Inode (8520074)  because there is only one file if you remove one file Data still remain in the other file but link count reduces from 2 to 1.
  •  Symbolic link has different inode number because it is a different file.
  •  Original file permission (rw-r--r--) is applicable, permission shown on symlink (lrwxrwxrwx) are meaningless
  • If you remove Original file, then symlink point to missing files
Symlink Missing


Post a Comment

Related Posts Plugin for WordPress, Blogger...

Follow my blog with Bloglovin UA-41829888-1