If I have a specific file in a UNIX filesystem, is there a way to use bash to find all links to that file, both symbolic and hard? If I need different commands for each, what are they?
Finding all symbolic and hard links to a file on UNIX
bashhardlinksymbolic-linkunix
Best Answer
Try this with GNU
find
:Example output:
You could use
-ls
instead of-exec
but it will show the inode and other information of the target file instead of the individual files.