Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Nov 2010 19:23:41 +0800
From:      darcsis@gmail.com (Denise H. G.)
To:        Garrett Cooper <gcooper@freebsd.org>
Cc:        freebsd-hackers@freebsd.org, Matthew Jacob <mj@feral.com>
Subject:   Re: find(1): Is this a bug or not?
Message-ID:  <8639qjxdfm.fsf@pluton.xbsd.name>
In-Reply-To: <AANLkTinZvVoSyoBJm6E2mSHSom7JhMjyMLaHdg-=5Bf4@mail.gmail.com> (Garrett Cooper's message of "Mon, 29 Nov 2010 14:15:14 -0800")
References:  <86r5e3zye4.fsf@pluton.xbsd.name> <4CF40F8F.30303@feral.com> <AANLkTinZvVoSyoBJm6E2mSHSom7JhMjyMLaHdg-=5Bf4@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On 2010/11/30 at 06:15, Garrett Cooper <gcooper@freebsd.org> wrote:
> 
> On Mon, Nov 29, 2010 at 12:39 PM, Matthew Jacob <mj@feral.com> wrote:
>> can you report out the actual command line you're using and what release
>> it's from?
>> 
>> On 11/29/2010 12:08 PM, Denise H. G. wrote:
>>> 
>>> Hi,
>>> 
>>> I found that, while searching for empty directories, find(1) will not
>>> continue if it encounters a dir it can't enter (e.g. no privilege). I
>>> don't know if it's so designed... I've checked NetBSD and OpenBSD's
>>> implementations (almost identical to that of FreeBSD's). And they behave
>>> the same way as FreeBSD's find(1) does under the circumstance.
>>> 
>>> I'm wondering if this is a bug or not.
> 
>     I thought I had seen something similar to this in the past, but I
> can't reproduce it with simple cases:
> 
> $ find .
> .
> ./cant-touch-this
> find: ./cant-touch-this: Permission denied
> ./hello-world
> ./hello-world/are-you-sure
> $ find . -name '*'
> .
> ./cant-touch-this
> find: ./cant-touch-this: Permission denied
> ./hello-world
> ./hello-world/are-you-sure
> $ find . -type f
> find: ./cant-touch-this: Permission denied
> ./hello-world/are-you-sure
> $ sudo find . -type f
> ./cant-touch-this/mchammer
> ./hello-world/are-you-sure

"find . -type f" will be ok. but "find . -type d -empty" won't work as
expected, I think.

> 
> Thanks,
> -Garrett
> ................ 



-- 
Self starters --- won't.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8639qjxdfm.fsf>