top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

You have two files in two different directories with the same inode. What type of link is involved?

+1 vote
386 views
You have two files in two different directories with the same inode. What type of link is involved?
posted Mar 3, 2014 by Bhani Bhosle

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button
Looks to be a interview question, should be softlink...

1 Answer

+1 vote

The answer i suppose is Hard.
All Hard links have the same inode number, unlike symbolic links.

Hard Link is a mirror copy of the original file. Hard links share the same inode. Any changes made to the original or Hard linked file will reflect the other. Even if you delete any one of the files, nothing will happen to the other.
Hard links can't cross file systems.

Soft Link is a symbolic link to the original file. Soft Links will have a different Inode value.
A soft link points to the original file. If you delete the original file, the soft link fails. If you delete the soft link, nothing will happen. Hard links can cross file systems.

answer Mar 3, 2014 by Hiteshwar Thakur
...