Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

find -name problem

Posted on 2007-12-03
3
Medium Priority
?
248 Views
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?
0
Comment
Question by:mfarid1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 46

Accepted Solution

by:
Kent Olsen earned 200 total points
ID: 20397784
Hi mfarid1,

redirect the errors to null..

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



Good Luck,
Kent
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 20400613
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
 
LVL 3

Expert Comment

by:amirs80
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
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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…
Suggested Courses

618 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