Re: find command w/ permission denied omitted

From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 02/10/04


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 ***


Relevant Pages

  • Re: find command w/ permission denied omitted
    ... > 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: ... > -prune, greps, etc. and have not been able to figure out a combination ... > find tries to search directories that I don't have permission to? ...
    (comp.unix.questions)
  • find command w/ permission denied omitted
    ... 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: ... find tries to search directories that I don't have permission to? ...
    (comp.unix.questions)
  • find command w/ permission denied omitted
    ... 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: ... find tries to search directories that I don't have permission to? ...
    (comp.unix.misc)
  • Re: find command w/ permission denied omitted
    ... > 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: ... > find tries to search directories that I don't have permission to? ...
    (comp.unix.misc)
  • Re: find command w/ permission denied omitted
    ... > 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: ... > find tries to search directories that I don't have permission to? ...
    (comp.unix.misc)