Unix administration - Using find / -name

This is Interesting: Free IT Magazines  
Home > Archive > Unix administration > April 2005 > Using find / -name





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Using find / -name
Cosmic Cruizer

2005-04-17, 8:47 pm

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
Barry Margolin

2005-04-17, 8:47 pm

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 ***
Chris F.A. Johnson

2005-04-17, 8:47 pm

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
Cosmic Cruizer

2005-04-18, 2:54 am

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

> On Mon, 18 Apr 2005 at 01:04 GMT, Cosmic Cruizer wrote:
>
> find / -name sometext 2>/dev/null
>


Chris and Barry Margolin, thanks for your quick answer!
Dave Hinz

2005-04-18, 5:53 pm

On Mon, 18 Apr 2005 02:20:57 GMT, Cosmic Cruizer <XXjbhuntxx@white-star.com> wrote:

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


Yup, they're like that.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com