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

Kent Olsen 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
centos linux 65 193
awk to variable in bash 2 114
FTP'ing Huge files ... How to ? FTP in segments -or- pick up ftp where you left off 5 78
list of sudo access for date range 5 35
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension ( This reminded me of questions tha…
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…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

730 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