2011/9/12 Adam Vande More <amvandem...@gmail.com>

> 2011/9/12 Коньков Евгений <kes-...@yandex.ru>
>
>> # fstat -f /var
>>
>> USER     CMD          PID   FD MOUNT      INUM MODE         SZ|DV R/W
>>
>> root     snmpd      20545    3 /var      47141 -rw-------  37217152  w
>>
>> root     snmpd      20545    8 /var      47159 -rw-r-----     728  r
>>
>> root     cron       20455   wd /var      47105 drwxr-x---     512  r
>>
>> ...
>>
>>
>> # find /var -inum 47141 -ls
>>
> You find the inode number with fstat(1) then use find(1) to translate it to
> a filename.  It works fine here, if it doesn't work for you perhaps you have
> a user error or there is some other sort of bug.
>

One other thing, it's possible the inode is gone by the time you have run
find(1) so be sure you are working with current fstat(1) output.  May be
easier to script the transform if this is something you are doing regularly.


-- 
Adam Vande More
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to