Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!sri-unix!teknowledge-vaxc!mkhaw From: mkhaw@teknowledge-vaxc.ARPA (Michael Khaw) Newsgroups: comp.unix.wizards Subject: Re: impossible problem for find(1)? Message-ID: <12114@teknowledge-vaxc.ARPA> Date: Fri, 24-Apr-87 11:59:25 EST Article-I.D.: teknowle.12114 Posted: Fri Apr 24 11:59:25 1987 Date-Received: Sat, 25-Apr-87 19:15:52 EST References: <2645@phri.UUCP> Reply-To: mkhaw@teknowledge-vaxc.UUCP (Michael Khaw) Organization: Teknowledge, Inc., Palo Alto CA Lines: 19 In article <2645@phri.UUCP> roy@phri.UUCP (Roy Smith) writes: > > A user posed a problem which I can't solve. She wants to find all >the files named *refs which are newer than a file called INDEX in the same >directory. Thus she wants to know if any of ./x/foorefs, ./x/barrefs or >./x/bazrefs is newer than ./x/INDEX, and if ./y/z/refs is newer than >./y/z/INDEX, etc. I can't think of how to do this with find, or even any How about (csh) % foreach dir (x y) # `pwd` == parent of x and y ? find $dir -name '*refs' -newer $dir/INDEX -print ? end Mike Khaw -- internet: mkhaw@teknowledge-vaxc.arpa usenet: {hplabs|sun|ucbvax|decwrl|sri-unix}!mkhaw%teknowledge-vaxc.arpa USnail: Teknowledge Inc, 1850 Embarcadero Rd, POB 10119, Palo Alto, CA 94303