Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!oliveb!pyramid!voder!mas1!jda From: jda@mas1.UUCP Newsgroups: comp.unix.questions Subject: Re: Identify file name given file descriptor Message-ID: <513@mas1.UUCP> Date: Tue, 19-May-87 21:06:05 EDT Article-I.D.: mas1.513 Posted: Tue May 19 21:06:05 1987 Date-Received: Thu, 21-May-87 02:09:57 EDT References: <710@twitch.UUCP> Organization: Measurex Automation Systems, Cupertino, CA Lines: 17 Summary: Even if it has no name Several pointed out that a file with no links has no name. But Ultrix 1.0 (and presumably also 4.2BSD) often makes NO change to the directory entry when a file is unlinked. (The preceding entry has its d_reclen incremented to render the obsolete entry "invisible". Presumably the obsolete entries are destroyed only when the directory is about to grow by a block.) You will need a special version of readdir(3) which returns "erased" entries. It should be fun to write since the obsoleted entries can be in various stages of obliteration! :-) BTW, has anyone written a real "unrm" program? -- James D. Allen