Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ames!eos!jbm From: jbm@eos.UUCP (Jeffrey Mulligan) Newsgroups: comp.unix.wizards Subject: Re: stat of i-node Message-ID: <5008@eos.UUCP> Date: 6 Sep 89 00:40:56 GMT References: <172@bmers58.UUCP> <19362@mimsy.UUCP> <179@bmers58.UUCP> Organization: NASA Ames Research Center, California Lines: 21 davem@bmers58.UUCP (Dave Mielke) writes: +The problem with fstat is that it requires an open which also does a +name lookup. This proves to be very slow when the directories get +large. I need a way to get the information that stat would return +without the expense of a name lookup. The i-node is the obvious key to ^ i-node number? +the data, but I am unaware of any primitive that gives an application +program direct access to the data via its actual key. I would +appreciate any assistence that anyone can offer. Well, if you can live with the security holes generated by having your program run setuid root (or worse still, making /dev/disk readable), you can just seek and read on the raw file system. See filsys(5). -- Jeff Mulligan (jbm@aurora.arc.nasa.gov) NASA/Ames Research Ctr., Mail Stop 239-3, Moffet Field CA, 94035 (415) 694-3745