Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site Shasta.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!decwrl!Shasta!rsf From: rsf@Shasta.ARPA Newsgroups: net.unix-wizards Subject: inode number -> pathname? (4.2BSD) Message-ID: <6727@Shasta.ARPA> Date: Sun, 7-Jul-85 22:53:24 EDT Article-I.D.: Shasta.6727 Posted: Sun Jul 7 22:53:24 1985 Date-Received: Tue, 9-Jul-85 06:02:58 EDT Distribution: net Organization: Stanford University Lines: 14 I am looking for a good way to generate the full path name of a directory, given only its inode number (plus the device number of its filesystem). Does anyone know if there's a good way to do this in 4.2BSD? Clearly, being able to chdir to the directory, given only its device and inode numbers, would be sufficient for my needs. The 'obvious' solution is to open the file system as a device, parse the data structures to find the appropriate inode, and then follow the ".." entries to construct the pathname (this is effectively what "ncheck" does). However, I'd prefer a cleaner solution if at all possible. Also, does anyone know if this is likely to be any easier to do in 4.3BSD? Ross.