Unix Programming - How to go from dev+inode to filename(s)?

This is Interesting: Free IT 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:36 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, 8:36 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, 8:36 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






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com