Linking files with ln
Links are of two types. Hard links and Symbolic links.
Hard links - Hard links are two files on a machine pointing to the same location on the hard-disk. The inodes of both the hard-linked files is the same. This means that even if you remove any of the files, the other file remains inremove hard link can be created in the following way.
ln source_file target_file
Symbolic links - A symbolic link is just a pointer to a file on the same filesystem. Symbolic links can be created to files on some other machine if the two machines are in the same network file system like (nfs). This is not possible with hard links, however. Purpose of creating a symbolic link can be to save space on network file system and avoid maintaining same copies of files in multiple locations. Symbolic links are created with -s option of the ln command in the following way.
ln -s source_file target_file
Unlike hard links, if source file is removed, the symbolic link contains nothing.
