how to locate file by inode?
Eugene M. Minkovskii
emin at mccme.ru
Thu Mar 23 06:40:42 UTC 2006
Hello!
Does anybody know how to locate file by inode? For example, using
fstat(1) I see:
USER CMD PID FD MOUNT INUM MODE SZ|DV R/W
...
user some_program 84130 0 /dev 68 crw--w---- ttyp0 rw
user some_program 84130 1 /usr 595890 -rw-r--r-- 0 w
user some_program 84130 2 /dev 68 crw--w---- ttyp0 rw
...
I see that some_program using file whith inode 595890 on mount
point /usr like STDOUT. To find it I do following:
$ find -x /usr -inum 595890
to find two files:
$ find -x /usr \( -inum 595890 -o -inum $other_inum \) -ls
but this is too slow. Does any body know other, more directly
method?
--
Sensory yours, Eugene Minkovskii
Сенсорно ваш, Евгений Миньковский
More information about the freebsd-questions
mailing list