Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 SMI; site sun.uucp Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!talcott!panda!genrad!decvax!decwrl!sun!guy From: guy@sun.uucp (Guy Harris) Newsgroups: net.unix-wizards Subject: Re: inode number -> pathname? (4.2BSD) Message-ID: <2414@sun.uucp> Date: Fri, 12-Jul-85 03:22:29 EDT Article-I.D.: sun.2414 Posted: Fri Jul 12 03:22:29 1985 Date-Received: Sat, 13-Jul-85 14:03:15 EDT References: <6727@Shasta.ARPA> <2071@ucf-cs.UUCP> Organization: Sun Microsystems, Inc. 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). > How about: > > find / -inum inode-number -print Well, this is even slower than "ncheck", and will report *all* files that have that inumber; remember, the problem was "translate a device/inumber *pair* to the directory with that inumber *on that device*". Guy Harris P.S. 4.xBSD is the only UNIX that documents "-inum" but I think it's been in there since V7 and is thus in S3 and S5 as well.