Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

find -name problem

Posted on 2007-12-03
3
Medium Priority
?
249 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
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month20 days, 19 hours left to enroll

810 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