Subject: Re: find question
To: None <netbsd-help@netbsd.org>
From: Georges Heinesch <geohei-ml@geohei.lu>
List: netbsd-help
Date: 06/03/2001 00:29:19
Quoting Frederick Bruckman (01-Jun-01 14:10:37):

> On 1 Jun 2001, Georges Heinesch wrote:

>> Quoting Frederick Bruckman (31-May-01 01:17:48):
>>
>> > You were searching the device and not the mounted file-system?
>>
>> Couold you please explain this.

> You posted this...

Well ...

You said: "You were searching the device and not the mounted
          file-system?"

I asked:  "Could you please explain this?"

What's the problem?

>> Example:
>>
>>    find /mnt/cd0 -name syssrc.tgz
>>
>> This doesn't find syssrc.tgz. However it's on the CD.

> However, that's not much of an example, as there's no result.

That's the point. There should be a result.

> The
> other posters that tried to help you pasted exactly what they typed,
> beginning with "mount", and exactly what came back. You never
> followed their example, but just said "Oh, it works now".

----- cut here -----
From collver@linuxfreemail.com Tue, 29 May 2001 06:29:34 -0700
From: collver@linuxfreemail.com
To: "Georges Heinesch" <geohei-ml@geohei.lu>
Subject: Re: find question
Date: 29 May 2001 13:29:34 GMT
----- cut here -----

He showed an example where it worked for him.
I didn't have anything to add (why should I?).

----- cut here -----
From jlindgren@slk.com Tue, 29 May 2001 09:34:02 -0400 (Eastern Daylight Time)
From: "Jon Lindgren" <jlindgren@slk.com>
To: "Georges Heinesch" <geohei-ml@geohei.lu>
Subject: Re: find question
Date: 29 May 2001 13:34:02 GMT
----- cut here -----

I tested and replied.

> So
> frankly, I'm thinking pilot error: maybe you there never was a CD
> mounted on
> /mnt/cd0, or maybe you typed "find /dev/cd0a ..."?

Come on ... other CDs worked fine!

> Whatever it was,
> I'm sure you'll figure it out, in time.

I got the answer now via e-mail (from Wolfgang Solfrank).

An empty (newly created directory) in NetBSD has a linkcount of 2. If
it's filled, it's +2. The iso 9660 standard usually burns CD with a
linkcount of 1.

find sees 2 (with my CD, creating the problem) and stops searching
since 2 means an empty directory. If !=2 is found, the recursive
routine inside find starts.

Here what ls -ld /mnt/cd0 says with the CD in question inserted and
mounted!

# cd /mnt/CD0
# ls -ld
# drwxrwxrwx  2 root  wheel  2048 Mar  1 14:23 .

Here a properly mastered iso 9660 CD.

# cd /mnt/CD0
# ls -ld
# dr-xr-xr-x  1 root  wheel  2048 Sep 15  2000 .

That's te reason ...

-- 
Cu  Georges Heinesch, Luxembourg
    geohei@geohei.lu
    http://www.geohei.lu
    PGP RSA & DH/DSS public key on request and on public servers

... niammi niammi in my Tammi ...