the difference between a soft link and a hard link?

Answer Posted / upendar

Soft Link: When we create a soft link, the link is created and stored in same address where the file is stored. The disadvantage of this type of link is if we delete the file the link becomes broken link and our data is lost.

Ex: ln -s data.text slink.text
If we delete data.text, slink.text link becomes broken link and our data lost.

Hard Link: When we create a hard link, the link is created and
stored in different address. But if we delete the file , the file is deleted and the link remain active so we won't loss the data.

Ex: ln data.text hlink.text
If we delete the file data.text, our data would be accessible through the hlink.text.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which command is used to restrict incoming messages?

588


What is the command to compare two files in unix?

618


How do I search for text in vi?

583


How do I open a port?

587


Does cp command overwrite files?

615






What command is used to switching between users in unix?

556


What is the command to find hidden files in the current directory?

577


What is the use of the command 'ls -x chapter[1-5]' ?

659


How is the command '$cat file2 ' different from '$cat >file2 and >> redirection operators ?

757


Write a command to display a file’s contents in various formats?

619


What is command substitution?

618


What does sed command do in unix?

556


What does touch command do in unix?

721


Is grep faster than awk?

555


What does find command return in unix?

592