Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site gsg.UUCP Path: utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!petrus!bellcore!decvax!gsg!lew From: lew@gsg.UUCP (Paul Lew) Newsgroups: net.unix,net.unix-wizards,net.wanted Subject: Re: Need unix command file HELP! Message-ID: <160@gsg.UUCP> Date: Mon, 17-Feb-86 10:21:42 EST Article-I.D.: gsg.160 Posted: Mon Feb 17 10:21:42 1986 Date-Received: Tue, 18-Feb-86 04:37:05 EST References: <245@aero.ARPA> <587@smeagol.UUCP> <259@hadron.UUCP> <1320@utai.UUCP> Reply-To: lew@gsg.UUCP (Paul Lew) Organization: General Systems Group, Salem, NH Lines: 24 Xref: watmath net.unix:7127 net.unix-wizards:16814 net.wanted:8191 Summary: >All the folk who are responding that the way to get the file names >of files containing a particular string are kind of forgetting that >the grep family does n o t automatically print out file names. >This: > >find / -exec fgrep this-is-the-string '{}' \; > >will give a file full of lines containing this-is-the-string. Try: > Notice that if you do grep on more than one files, file names will be displayed. A simple solution to the problem is to use: find / -exec fgrep this-is-the-string /dev/null '{}' \; and YOU DO NOT HAVE TO WRITE ANY SCRIPT to do so. -- ---------------------------------------------------------------------- Paul S. Lew decvax!gsg!lew (UUCP) General Systems Group 51 Main Street, Salem, NH 03079 (603) 893-1000 ----------------------------------------------------------------------