Re: find command w/ permission denied omitted
From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 02/10/04
- Next message: Aryn Just: "Re: find command w/ permission denied omitted"
- Previous message: bmccall: "Re: find command w/ permission denied omitted"
- In reply to: Aryn Just: "find command w/ permission denied omitted"
- Next in thread: Aryn Just: "Re: find command w/ permission denied omitted"
- Reply: Aryn Just: "Re: find command w/ permission denied omitted"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 10 Feb 2004 13:08:13 -0500
In article <u16i209er28sgkd7h4nctavjsgiiaf2ehb@4ax.com>,
Aryn Just <apfrenger@cox.net> wrote:
> Hi all,
>
> I am trying to search my server for a file, and I don't want it to get
> lost in hundreds of permission denied (e.g. find: cannot read dir
> ./usr/lost+found: Permission denied)
>
> I have been trying combinations of the find command with -perm,
> -prune, greps, etc. and have not been able to figure out a combination
> that works. Does anyone know the syntax to search all directories for
> a name pattern and omit printing the permission denied lines when the
> find tries to search directories that I don't have permission to?
>
> It would be something like: find . -name "myfile*.*" -omit permission
> denied.
A common solution is to just redirect stderr to /dev/null. However,
this will suppress all error messages, not just find's permission
warnings.
-- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***
- Next message: Aryn Just: "Re: find command w/ permission denied omitted"
- Previous message: bmccall: "Re: find command w/ permission denied omitted"
- In reply to: Aryn Just: "find command w/ permission denied omitted"
- Next in thread: Aryn Just: "Re: find command w/ permission denied omitted"
- Reply: Aryn Just: "Re: find command w/ permission denied omitted"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|