BLU Discuss list archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Mapping inode numbers to file names
- Subject: Mapping inode numbers to file names
- From: richard.pieri-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org (Richard Pieri)
- Date: Tue, 27 Apr 2010 21:53:39 -0400
- In-reply-to: <001301cae60c$b043a660$10caf320$@com>
- References: <001301cae60c$b043a660$10caf320$@com>
On Apr 27, 2010, at 9:22 AM, Edward Ned Harvey wrote: > > Is there any faster way to find the file name(s) when all you know is the > inode number? (Actually, all you know is all the info that's in the present > directory, which is not limited to inode number; but, inode number is the > only information that I personally know could be useful.) Not the way that you seem to want. inodes specifically do not contain any file naming references. This is intentional. It's how hard links on Unix work (and cross-linked files on FAT... er... don't). What you need to do is traverse the raw directory data for the filesystem looking for the inode you want and matching it to one or more file names. Yes, this will be slow. No, there's no way around it. You're stuck doing an exhaustive search if you want to go backwards. --Rich P.
- References:
- Mapping inode numbers to file names
- From: solaris2-Z8efaSeK1ezqlBn2x/YWAg at public.gmane.org (Edward Ned Harvey)
- Mapping inode numbers to file names
- Prev by Date: Mapping inode numbers to file names
- Next by Date: Mapping inode numbers to file names
- Previous by thread: Mapping inode numbers to file names
- Next by thread: Mapping inode numbers to file names
- Index(es):