[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grep remove "no such file or directory"
From: |
Andreas Schwab |
Subject: |
Re: grep remove "no such file or directory" |
Date: |
Wed, 06 May 2009 17:13:10 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.93 (gnu/linux) |
Greg Wooledge <wooledg@eeg.ccf.org> writes:
> If your actual problem is "Find all the files containing the string
> StateRB, and suppress all error messages", then use this:
>
> find . -type f -exec grep -l StateRB {} \; 2>/dev/null
Or with a recent version of find (also POSIX):
$ find . -type f -exec grep -l StateRB {} + 2>/dev/null
which has the advantage of starting less grep jobs.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."