[X-Unix] Can you get the path from an inode?

Eugene list-themacintoshguy at fsck.net
Sat Apr 29 16:12:30 PDT 2006


On Fri, Apr 28, 2006 at 08:07:04AM CDT, Craig A. Finseth <fin at finseth.com> wrote:
: 
: 	...
:    I have an application which tells me only the inode number of a file it is
:    having problems with.  Is there any way to get the path and filename from
:    the inode number?
: 	...
: 
: You can get _a_ path (there may be many), but it is work.
: 
: - Start at the root of the volume.
: - Loop through all entries in the directory
: 	- See if you found your inode.
: 	- If it's a directory, recurse on it

Blah, anyone can do a brute-force search.  But I wonder if there
is a simple function call where you input an inode and a device,
and get a path.


-- 
Eugene
http://www.coxar.pwp.blueyonder.co.uk/


More information about the X-Unix mailing list