find -name problem

Posted on 2007-12-03
Last Modified: 2010-04-20
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?
Question by:mfarid1
LVL 45

Accepted Solution

Kdo earned 50 total points
ID: 20397784
Hi mfarid1,

redirect the errors to null..

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

Good Luck,
LVL 40

Expert Comment

ID: 20400613

You may:

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



find / -name FileName.txt > /tmp/results.$$ 2>&1
grep -v "Permission denied" /tmp/results.$$ | more

Expert Comment

ID: 20401505
its quite better if u run the command with administrative priviledges or run the command with current directory option after moving into directory

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Guacamole cut and paste issue 3 46
AWS CLI issues with Tags 3 63
Exchange 2010 unable to mount DB due to corruption 11 68
Martian Packets Unix 5 30
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
FreeBSD on EC2 FreeBSD ( is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now