Using find / -name - Unix

This is a discussion on Using find / -name - Unix ; 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 ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Using find / -name

  1. Using find / -name

    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

  2. Re: Using find / -name

    In article ,
    Cosmic Cruizer 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 ***

  3. Re: Using find / -name

    On Mon, 18 Apr 2005 at 01:04 GMT, Cosmic Cruizer 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.


    find / -name sometext 2>/dev/null

    --
    Chris F.A. Johnson http://cfaj.freeshell.org/shell
    ================================================== =================
    My code (if any) in this post is copyright 2005, Chris F.A. Johnson
    and may be copied under the terms of the GNU General Public License

  4. Re: Using find / -name

    "Chris F.A. Johnson" wrote in
    news:s9ebj2-ph5.ln1@rogers.com:

    > On Mon, 18 Apr 2005 at 01:04 GMT, Cosmic Cruizer 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.

    >
    > find / -name sometext 2>/dev/null
    >


    Chris and Barry Margolin, thanks for your quick answer!

  5. Re: Using find / -name

    On Mon, 18 Apr 2005 02:20:57 GMT, Cosmic Cruizer wrote:

    > Chris and Barry Margolin, thanks for your quick answer!


    Yup, they're like that.

+ Reply to Thread