Google News
logo
Unix - Interview Questions
Describe a link in UNIX.
Link is used to assigning more than one name to a file. It is like a pointer to a file and one file can have multiple pointers. There are two types of link

Hard link : These hard-linked files are assigned to the same inode value as the original and thus reference the same physical location of the file. Also if the file is moved to a different directory the link will still work
ln  [original filename] [link name]?

Symbolic link : A soft link is similar to the file shortcut feature and it contains a separate inode than the original one. If the original file is moved then the link might not work, but it can reference across the different file systems.
ln  -s [original filename] [link name]?
Advertisement