Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!amdahl!oliveb!sun!gorodish!guy From: guy@gorodish.Sun.COM (Guy Harris) Newsgroups: comp.unix.questions Subject: Re: Accessing files by inode #s Message-ID: <41491@sun.uucp> Date: 10 Feb 88 04:25:34 GMT References: <280@cutsys.UUCP> <642@nuchat.UUCP> Sender: news@sun.uucp Lines: 85 > The reason the reference to -inum was deleted is that the concept > of an inumber relates to one specific (well, two, but I digress) > implementation of the filesystem. Thus all mention of them (inodes) > were expurgated from the SVID. And since all recent sysV manuals > are derived from the SVID (choke gasp) they all lack any information > on how things work. 1) The System III manual doesn't mention "-inum" either, and that manual certainly antedates the SVID, since it antedates SV. I assume here that the S3 "find" had "-inum"; the V7 one did (and documented it), and the S5 one did (but didn't document it). It is certainly possible that they picked it up from Research between S3 and S5. Unfortunately, it has been several years since I had S3 source handy, so I can't check this. However: 2) The System V "Release 1" manual also doesn't mention it. The SCCS ID in The S5R1 "find.1" has a date of 5/18/82, while the SVID, Issue 2, has a copyright year of 1986. (Issue 1 didn't have any commands.) The S5R1 "find" definitely *did* have "-inum"; I just checked the S5R1 source. 3) On page 126 of Volume 2 of Issue 2 of the SVID, it says (this is the page for "stat" and "fstat"): The contents of the structure "stat" pointed to by "buf" include the following members: ... ino_t st_ino; /* i-node number */ so it appears that all mention of inodes were not removed from the SVID, unless you consider "i-node"s to be different from "inode"s. 4) The concept of an i-number may relate to some particular file system implementations, but the concept of a unique per-file-system file ID doesn't. From Draft 12 of the POSIX standard: file serial number A "file serial number" is a per-"file system" unique identifier for a "file". "File serial numbers" are not necessarily unique throughout the system. ... 5.6 File Characteristics ... 5.6.1.2 Description The header defines the structure "stat" returned by the functions "stat()" and "fstat()". Member Member Type Name Description ______ ______ _____________________________ ... ino_t st_ino File serial number so saying that i-numbers are peculiar to some particular file system type provides no excuse for leaving "-inum" out; "find -inum" can search for all files with a particular "file serial number". 5) "All recent sysV manuals are derived from the SVID"? Wrongo. The SVID is derived from various flavors of S5 manuals, and there may be some reverse-channel information flow (e.g. as people doing the SVID discover stuff the documentation Doesn't Quite Cover, things may get pushed back into the documentation), but the S5 manuals are *NOT* simply "derived from the SVID". 6) The S5 "find" manual page doesn't mention the "-ncpio" flag, either; this flag is similar to the documented "-cpio" flag, except that it produces "cpio -c" output rather than binary "cpio" output. If you grant that "find -cpio" is useful, you must grant that "find -ncpio" is far more useful, as binary "cpio" output cannot easily be read on machines with a different byte order (no, the byte swapping options in the S5 "cpio" don't help one bit - you *can't* do it with the tools provided with S5, unless you include "ed" or "vi" and "cc" among the tools). So it appears that there are several lacunae in the S5 "find" man page, some of which clearly can't be blamed on the baleful influence of the SVID. The hypothesis that best fits the facts here is that Somebody Just Forgot To Document It.