Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-lcc!styx!ptsfa!ihnp4!twitch!grt From: grt@twitch.UUCP ( G.R.Tomasevich) Newsgroups: comp.unix.questions Subject: Identify file name given file descriptor Message-ID: <710@twitch.UUCP> Date: Thu, 7-May-87 14:27:25 EDT Article-I.D.: twitch.710 Posted: Thu May 7 14:27:25 1987 Date-Received: Sat, 9-May-87 09:29:14 EDT Organization: AT&T Bell Labs, Holmdel, NJ Lines: 14 Keywords: mount, ncheck, partly tested This is a subsidiary to the 'more' discussion. I partly tested a method on Sys V R2, VAX 11/785. One can fstat(2) to get the inode value and the block-special identity. One must find out the name of the device, perhaps from stat'ting the disk devices until finding the right one (untested). One then generates and runs a command "/etc/ncheck -i inode blockdevice". On twitch one must be super-user to do that; I tried a file, and it took several minutes for ncheck to find the name. One then needs /etc/mount to associate the device with the proper mount directory. Whew! Is there a better way? Someone suggested walking down from /. How would he find out the correct file system, assuming more than one file matched the inode number? -- George Tomasevich, ihnp4!twitch!grt AT&T Bell Laboratories, Holmdel, NJ