Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!mit-eddie!uw-beaver!tektronix!cae780!hplabs!pyramid!prls!mips!rmg From: rmg@mips.UUCP (Richard M. Geiger) Newsgroups: comp.unix.wizards Subject: Re: impossible problem for find(1)? Message-ID: <340@quacky.UUCP> Date: Fri, 24-Apr-87 19:42:44 EDT Article-I.D.: quacky.340 Posted: Fri Apr 24 19:42:44 1987 Date-Received: Sun, 26-Apr-87 03:16:11 EDT References: <2645@phri.UUCP> Reply-To: rmg@quacky.UUCP (Richard M. Geiger) Organization: MIPS Computer Systems, Sunnyvale, CA Lines: 35 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 >combination of find and any other standard tools. We're running MtXinu >4.3BSD/NFS on a Vax and Sun-3.1 on some Sun-3's. Seems like you should be able to skin this cat with something like this... a script, /user/rmg/bin/sinceindex: #!/bin/sh echo ===== "$1" ===== cd "$1" ls -t *refs INDEX 2>/dev/null | sed -n -e '/^INDEX$/ p' and a find command: find . -type d -exec /user/rmg/bin/sinceindex {} \; This seems to work. I fiddled for a bit with getting it all on one command line, (to keep from having to have the script), but ran out of patience. I expect it could be done without the script. -- - Rich Geiger {decvax,ucbvax,ihnp4}!decwrl!mips!rmg MIPS Computer Systems, 930 E. Arques, Sunnyvale, CA 94086 (408) 720-1700 x308 [Day Job] (408) 739-7911 [home]