Linux – How to you see the actual hard link by ls

filesystemshardlinklinux

I run

ln /a/A /b/B

I would like to see at the folder a where the file A points to by ls.

Best Answer

You can find inode number for your file with

ls -i

and

ls -l

shows references count (number of hardlinks to a particular inode)

after you found inode number, you can search for all files with same inode:

find . -inum NUM

will show filenames for inode NUM in current dir (.)

Related Question