Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: Notesfiles $Revision: 1.7.0.10 $; site uiucuxc Path: utzoo!watmath!clyde!cbosgd!ihnp4!inuxc!pur-ee!uiucdcs!uiucuxc!hamilton From: hamilton@uiucuxc.CSO.UIUC.EDU Newsgroups: net.unix-wizards Subject: Re: Need unix command file HELP! Message-ID: <106000014@uiucuxc> Date: Tue, 4-Feb-86 00:48:00 EST Article-I.D.: uiucuxc.106000014 Posted: Tue Feb 4 00:48:00 1986 Date-Received: Thu, 6-Feb-86 04:39:01 EST References: <245@aero.ARPA> Lines: 25 Nf-ID: #R:aero.ARPA:245:uiucuxc:106000014:000:867 Nf-From: uiucuxc.CSO.UIUC.EDU!hamilton Feb 3 23:48:00 1986 our mailer couldn't find "sutton@aero". >We are looking for a utility that can, when given a arbitrary string, >can locate all occurences of that string anywhere on the system. Our >local Un*x gurus can't figure this out, so we are appealing to those out >in Netland to help us out. try something like: find / -type f -a -exec fgrep -s this-is-the-string \{\} \; -a -print if possible, add extra terms to limit the search. for example, if you want to search only for C source files, add: -name \*.c -a before the "-exec". you could certainly write something more efficient, but do you really need it that often? wayne hamilton U of Il and US Army Corps of Engineers CERL UUCP: {ihnp4,pur-ee,convex}!uiucdcs!uiucuxc!hamilton ARPA: hamilton%uiucuxc@a.cs.uiuc.edu USMail: Box 476, Urbana, IL 61801 CSNET: hamilton%uiucuxc@uiuc.csnet Phone: (217)333-8703