The only way I know is:
find /home -xdev -samefile file1
But it\'s really slow. I would like to find a tool like locate
.
The real
I know this is an old question, but many versions of find
have an inum
option to match a known inode number easily. You can do this with the following command:
find . -inum 1234
This will still run through all files if allowed to do-so, but once you get a match you can always stop it manually; I'm not sure if find
has an option to stop after a single match (perhaps with an -exec
statement?)
This is much easier than dumping output to a file, sorting etc. and other methods, so should be used when available.