Creating Hard Links
Hard links for any file can be created with command ln. One extra hard link file will be created in the respective directory.
Look at the above snapshot, we have created a hard link for the file xyz in the directory new1.
The original file and hard linked file both contain the same Inode number and hence, they have the same permissions and same owners. Content will also be the same for both the files. In short, both the files are equal now, but if original file will be removed then hard link file will not be affected.
Finding Hard Links
A hard link can be find with find command by specifying the Inode number. Inode number is always unique to its partition.
Look at the above snapshot, we have found hard link files with command "find / -inum 662786 2> /dev/null" for the Inode number 662786.