Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!decvax!tektronix!tekecs!orca!andrew From: andrew@orca.UUCP (Andrew Klossner) Newsgroups: net.unix-wizards Subject: Re: -depth option for find(1) Message-ID: <78@orca.UUCP> Date: Wed, 17-Aug-83 11:07:28 EDT Article-I.D.: orca.78 Posted: Wed Aug 17 11:07:28 1983 Date-Received: Wed, 17-Aug-83 19:32:50 EDT Lines: 21 "This option causes find to perform a 'form' of depth first search through the directory tree; all entries in a directory will be expanded before the directory name is found." It needs to be said. Both methods of walking the directory tree, where directories are visited before or after their files, are forms of depth-first search. The complement to depth-first is breadth-first, where you open all the top-level directories, followed by all the files named in those directories, followed by all the files named in all the directories named in those directories, etc. Visiting directories before their descendants is called a "pre-order walk" of the directory tree. Visiting directories after their descendants is called a "post-order walk". There's also an "in-order" walk, where you visit the first file in the directory, then the directory, then the rest of its files, but that's not very useful unless the tree is binary. -- Andrew Klossner (decvax!tektronix!tekecs!andrew) [UUCP] (andrew.tektronix@rand-relay) [ARPA]