Trying to identify names of UNIX files linked.

March 15, 2012 at 15:23:48
Specs: UNIX SUN OS
How do you identify names of 2 files hard linked in UNIX?

See More: Trying to identify names of UNIX files linked.

Report •

#1
March 16, 2012 at 04:25:04
Files that are hard linked share the same inode. The find command's -links +1 option displays all files with more than one hard link. Pipe find's output to the ls command (with long listing and inode options) and then pipe it to the sort command so the files are list in inode order:

find . -type f -links +1|xargs ls -li|sort -k 1,1


Report •
Related Solutions


Ask Question