Date: Thu, 23 Mar 2006 09:47:20 +0300 From: "Eugene M. Minkovskii" <emin@mccme.ru> To: freebsd-questions@freebsd.org Subject: how to locate file by inode? Message-ID: <20060323064720.GA24994@mccme.ru>
next in thread | raw e-mail | index | archive | help
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 Сенсорно ваш, Евгений Миньковский
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060323064720.GA24994>