stat of i-node

Jeffrey Mulligan jbm at eos.UUCP
Wed Sep 6 10:40:56 AEST 1989


davem at 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 at aurora.arc.nasa.gov)
	NASA/Ames Research Ctr., Mail Stop 239-3, Moffet Field CA, 94035
	(415) 694-3745



More information about the Comp.unix.wizards mailing list