Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!rpi!tale From: tale@cs.rpi.edu (David C Lawrence) Newsgroups: comp.unix.questions Subject: Re: partial finds Message-ID: Date: 6 Jan 90 08:05:36 GMT References: <12847@cbnews.ATT.COM> <104@melpar.UUCP> Organization: Rensselaer Polytechnic Institute, Troy NY Lines: 27 In <12847@cbnews.ATT.COM> res@cbnews.ATT.COM (Robert E. Stampfli) and in <104@melpar.UUCP> toppin@melpar.UUCP (Doug Toppin) both ask essentially the same question about the find command. The manual page provides the solution, but find is admittedly a rather cumbersome programme to work with at times because of its curious array of arguments. The solution lies in the -prune option; both Robert's and Doug's cases would use it in the same way: find DIR -name EXCLUDEDIR -prune -o WHATEVER DIR would be the directory to start the search in, as usual. EXCLUDEDIR is the name of the local component (basname) of the directory -- unfortunately something like "src/test" to just exclude test directories under source directories won't work. WHATEVER would be the normal arguments for whatever you are doing, "-type f -ls" or "-name '*.c' -print" or "WHATEVER" :-). This should probably be added to Frequently Asked Questions which makes reference to find(1) being a powerful command and encourages learning it, but a lot of people just can't learn from the manual page. A pointer to one or two better sources of information about it would be good. Dave -- (setq mail '("tale@cs.rpi.edu" "tale@ai.mit.edu" "tale@rpitsmts.bitnet"))