Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!hao!gatech!mcnc!rti!trt From: trt@rti.UUCP (Thomas Truscott) Newsgroups: comp.unix.wizards Subject: Re: To . or not to . Message-ID: <1806@rti.UUCP> Date: Sat, 24-Oct-87 12:54:00 EST Article-I.D.: rti.1806 Posted: Sat Oct 24 12:54:00 1987 Date-Received: Mon, 26-Oct-87 01:58:49 EST References: <648@tut.cis.ohio-state.edu> Organization: Research Triangle Institute, RTP, NC Lines: 42 Keywords: UNIX, file system Summary: Don't give "." and ".." a place to hide The infamous "." and ".." have infested our file sytems for far too long. They are cute, yes, but so was Gizmo. We all know what "." and ".." mean, and so does UNIX. Making them directory entries gives us a crutch, but also hobbles us and blurs our view of the one true pathname. They are a blot on all directory traversal programs. They mock our beloved dot-files, bringing grief to those who do ".*". They litter the file system, out numbering the directories themselves! And riddle me this: why does an empty directory have two entries? There is, quite simply, no good reason for them to darken our directories. Consider yon shell script: > for p in $x/*/. > do > stuff > done Is not $x/*/ shorter of breath yet fully as noble of purpose? But supposing we wish to permit this folly, could not the mighty shell, defender of SIGSEGV, deign to look for "." and ".." as even now it looks for "/"? Is this so great a price, when the humble chmod chown cp csh diff du ls rcp rm tar find uusnap must all stand watch for the mocking entries, lest they be locked within those lurking links? What is the cost? A mere trifle. The odd pathname matcher will need enlightment, as must the handful of programs who foolishly skip the first two directory entries. What is the gain? Enlightenment itself, for a heavy burden will indeed lift. Morn not for "." and ".." for as they cast off their wordly trappings they will be reborn, fresh in meaning and pure in concept. Tom Truscott