Re: Using find / -name

From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 04/18/05


Date: Sun, 17 Apr 2005 21:13:11 -0400

In article <Xns963BB7DC32123ccruizermydejacom@64.164.98.29>,
 Cosmic Cruizer <XXjbhuntxx@white-star.com> wrote:

> How can I do a find / -name sometext
> That does not print each path that has
> cannot read dir /somepath/somepath : Permission denied
>
> I don't see anything in the man pages that lists any flags that will
> suppress the Permission denied items. I also tried to use grep with a -v,
> but that did not work.
>
> Thanks

Redirect stderr:

find / -name sometext 2>/dev/null

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


Relevant Pages

  • Re: FAQ 6.21 Whats wrong with using grep in a void context?
    ... The problem is that grep builds a return list, ... map suffers from this problem as well. ... But since 5.8.1, this has been fixed, and map is context aware - ... in void context, no lists are constructed. ...
    (comp.lang.perl.misc)
  • Re: What does grep -M do?
    ... Purl Gurl wrote: ... Grep is very useful but has limits. ... lists, such as an array, grep works very well. ... Grep cannot be "told" when to stop looking or searching. ...
    (comp.lang.perl.misc)
  • Re: Syntax a little funny ....
    ... That returned list is immediately fed to another built-in, grep(). ... pattern match on the name to see if it begins with a dot. ... If the entry passes both tests, ... grepas a filtering engine you can use to build on-the-fly lists. ...
    (perl.beginners)
  • Re: FAQ 6.21 Whats wrong with using grep in a void context?
    ... The problem is that grep builds a return list, ... map suffers from this problem as ... But since 5.8.1, this has been fixed, and map is context ... no lists are constructed. ...
    (comp.lang.perl.misc)
  • Re: Piping the output of bash completion; command line navigation
    ... > but there is no obvious way to pipe it to anything (like grep). ... > a bash built-in and the man pages are terse). ... 'complete' is the action, not the command. ... Repeat lists ...
    (Debian-User)