Interview Question - What is the difference between Hard Link and Soft Link | Hard Link vs SymLink
Server Gyan Server Gyan
48.6K subscribers
4,590 views
129

 Published On Mar 5, 2021

In this video, we are going to learn the main interview question related to Hard Link and Soft Link.
We will discuss the following things in a practical manner-
1- Hard Link has Same Inode No ( ls -li)
2- ls -l command shows the file
3- Links contains actual data
4- Created on the same file system (/dev/sda1)
5- Can not be created for Directory
6- If you delete the original file, the content will be available.
7- Changes made in any file will reflect in all files.

And we will see Practical of following concepts-

1- Softlink Has different Inode No (ls -li)
2- ls -l command shows link file pointing to
3- Softlink contains the path of the original file, not content
4- Can create across file system (/dev/sda2)
5- Can be created for file and directory
6- Link does not work if the original file is deleted. It shows a broken link.
7- If the original file deleted, a link will be dangling.

show more

Share/Embed