*BSD News Article 37171


Return to BSD News archive

Xref: sserve comp.unix.questions:57195 comp.unix.aix:46816 comp.unix.bsd:15234 comp.unix.misc:14559 comp.unix.programmer:21214 comp.unix.shell:18765 comp.unix.solaris:25891 comp.unix.user-friendly:2928
Newsgroups: comp.unix.questions,comp.unix.aix,comp.unix.bsd,comp.unix.misc,comp.unix.programmer,comp.unix.programmers,comp.unix.shell,comp.unix.solaris,comp.unix.user-friendly
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.oz.au!spool.mu.edu!howland.reston.ans.net!cs.utexas.edu!utnut!info.physics.utoronto.ca!utzoo!sq!farook
From: farook@sq.sq.com (Farook Wadia)
Subject: Re: No subject
Message-ID: <1994Oct31.150849.15232@sq.sq.com>
Organization: SoftQuad Inc., Toronto, Canada
References: <091312Z28101994@anon.penet.fi>
Date: Mon, 31 Oct 94 15:08:49 GMT
Lines: 41

In article <091312Z28101994@anon.penet.fi> an141226@anon.penet.fi writes:
>
>I've been trying to do this:
>
>find . -name ytalk -print
>
>from the root directory to see if anyone has a certain file in a "public"
>directory on the system (in this example: ytalk).  But my output goes
>haywire:
>
>find: cannot read dir ./lost+found: Permission denied
>find: cannot read dir ./c2/lost+found: Permission denied
>find: cannot read dir ./export/lost+found: Permission denied
>  etc, etc... FOREVER!

How about using a combination of -user and -prune ? I guess the above 
directories aren't owned by you nor you have access permission for those
directories. So you check if the file (directory) under consideration
is not owned by you (you'll have to negate -user option) then use -prune
(that is bypass that directory).

I guess this should work. Let us know if it does (or if it doesn't :-) ).

>
>Is there a way to suppress these error messages?  Or have find ignore
>errors?  I tried the man pages and saw the -perm switch, but that didn't
>work.  Any ideas? Is this possible on a unix system?
>
>an141226@anon.penet.fi
>-------------------------------------------------------------------------
>To find out more about the anon service, send mail to help@anon.penet.fi.
>Due to the double-blind, any mail replies to this message will be anonymized,
>and an anonymous id will be allocated automatically. You have been warned.
>Please report any problems, inappropriate use etc. to admin@anon.penet.fi.

Farook.
-- 
**********************************************************
* Farook Wadia, System-Software Programmer, SoftQuad Inc.*
* SOFTQUAD INC. DOES NOT OWN OR SHARE MY OPINION         *
**********************************************************