Hard Link Vs Soft Link in Linux
A Link is a connection of one file with other. Links allow more than one file name to refer to the same file, elsewhere. In Linux we make the use of ln command to create links of a file. There are two types of links, both of which are created by ln : symbolic links , which refer to a symbolic path indicating the abstract location of another file, and hard links , which refer to the specific location of physical data. These links behave differently when the source of the link (what is being linked to) is moved or removed. Symbolic links are not updated (they merely contain a string which is the pathname of its target); hard links always refer to the source, even if moved or removed. For symbolic links we make use of ln -s and for hard links we make use of ln command as shown below : 1.) symbolic links : [root@server199 ks]# ln -s sed.sh softlink.sh [root@server199 ks]# ll -rs total 8 0 lrwxrwxrwx 1 root root 6 Dec 12 18:03 softlink.sh ...