bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: keep find from trying to spider directories where it has no permissi


From: jidanni
Subject: Re: keep find from trying to spider directories where it has no permission
Date: Sun, 20 Sep 2009 00:41:00 +0800

EB> Untested, but:
EB> -type d \! -readable -prune
EB> seems like it should do the trick of telling find to not descend into
EB> unreadable directories.

Well, I hope there can be an example added to the find man page.

Anyway, in the general case ... there needs to be a way...

$ chmod 0 jidanni.org/geo/islands
$ find jidanni.org -type f|wc
find: `jidanni.org/geo/islands': Permission denied
    419     419   17983
$ find jidanni.org ! -readable -prune -type f|wc
      0       0       0

Anyway, the challenge is to get the same output as
$ find jidanni.org -type f 2>&-|wc
    419     419   17983
without the 2>&- .




reply via email to

[Prev in Thread] Current Thread [Next in Thread]