Operating System - HP-UX
1839263 Members
4118 Online
110137 Solutions
New Discussion

how to do a find without permission denied output

 
SOLVED
Go to solution
Hunki
Super Advisor

how to do a find without permission denied output

Is there a way to find files on unix without getting the annoying "find: cannot read dir ./lost+found: Permission denied" outputs ...
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: how to do a find without permission denied output

Shalom,

Short answer: no.

If you are root you will get relatively few of these messages but you will get some.

If you are a regular user, don't do your finds from / the root of the system. If you limit your search to folders you own, the messages will be less frequent.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
James R. Ferguson
Acclaimed Contributor
Solution

Re: how to do a find without permission denied output

Hi Hunki:

A general solution is :

# find / -name hunki 2> /dev/null

...thus eliminating STDERR output.

Regards!

...JRF...
Hunki
Super Advisor

Re: how to do a find without permission denied output

Kool Deal ..Thx