Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!nike!ucbcad!ucbvax!sdcsvax!sdcc6!celerity!jjw From: jjw@celerity.UUCP (Jim ) Newsgroups: net.unix Subject: Re: inodes Message-ID: <604@celerity.UUCP> Date: Mon, 27-Oct-86 11:21:04 EST Article-I.D.: celerity.604 Posted: Mon Oct 27 11:21:04 1986 Date-Received: Mon, 27-Oct-86 22:41:05 EST References: <47@andromeda.UUCP> <742@hropus.UUCP> Reply-To: jjw@celerity.UUCP (Jim (JJ) Whelan) Organization: Celerity Computing, San Diego, Ca. Lines: 12 Keywords: Anything like getpwent() for i-nodes ? >> Is there any way to "get" an i-node into a C >> program, the way getpwent gets passwd entries ? Do I really have to >> open the device file and look for the i-list ? > >The stat(2) call yields a lot of info in the inode, but if you are >looking for block info, reading the inode is the only means of getting >it. Note that doing this is inherently non-portable and, if it is used in a program which will be used for more than a short time, it may break several years down the line if the inode is changed due to the addition of some new feature.