find -name problem

When I do:

find -name FileName.txt

from the root of my box, I get output like this:

find: ./fld1/fld2/fld3/fld4/fd: Permission denied
find: ./fld5/fld6/fld7/fld8/fd: Permission denied


There are a lof of lines like this. How do I get information only on folders to which I have permission?
mfarid1Asked:
Who is Participating?
 
Kent OlsenData Warehouse Architect / DBACommented:
Hi mfarid1,

redirect the errors to null..

find / -name FileName.txt 2>/dev/null



Good Luck,
Kent
0
 
omarfaridCommented:
Hi,

You may:

1- run the find command as root (if you are the administrator of the m/c)

or

2-

find / -name FileName.txt > /tmp/results.$$ 2>&1
grep -v "Permission denied" /tmp/results.$$ | more
0
 
amirs80Commented:
its quite better if u run the command with administrative priviledges or run the command with current directory option after moving into directory
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.