For Programmers: Free Programming Magazines  


Home > Archive > Unix Programming > May 2004 > How to go from dev+inode to filename(s)?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to go from dev+inode to filename(s)?
kj

2004-05-19, 8:32 pm




If I have a file's device and inode, is there a simple way to get
the filename(s) associated with this dev+inode pair?

Thanks!

kj

--
NOTE: In my address everything before the period is backwards.
Barry Margolin

2004-05-19, 9:31 pm

In article <c8gp1a$18q$2@reader2.panix.com>, kj <socyl@987jk.com>
wrote:

> If I have a file's device and inode, is there a simple way to get
> the filename(s) associated with this dev+inode pair?


No. You have to search the filesystem mounted on the device, calling
lstat() on each directory entry to see if it matches the inode.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
joe@invalid.address

2004-05-19, 9:31 pm

kj <socyl@987jk.com> writes:

> If I have a file's device and inode, is there a simple way to get
> the filename(s) associated with this dev+inode pair?


I responded to this on one of the other newsgroups you multi-posted
this to. Please crosspost rather than multipost, it's easier for you
and more efficient.

Joe
--
"Surprise me"
- Yogi Berra when asked where he wanted to be buried.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com