[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Changes to the filesystem while find is running - comments?
From: |
James Youngman |
Subject: |
Re: Changes to the filesystem while find is running - comments? |
Date: |
Thu, 25 Nov 2004 22:40:32 +0000 |
User-agent: |
Mutt/1.3.28i |
On Thu, Nov 25, 2004 at 09:45:25AM +1100, Tim Nelson wrote:
> Ok, so the sequence in find is currently (in pseudo-perl):
> -----------
> $old = stat $dir;
> chdir $dir;
> $new = stat $dir;
> wd_sanity_check($old, $new);
> -----------
No, we lstat(".") rather than $dir.
> If your information is correct, then what we need to do is
> something like:
> -----------
> $tmp = $dir . '.';
> $old = stat $tmp;
> chdir $dir;
> $new = stat $tmp;
> wd_sanity_check($old, $new);
> -----------
>
> Would that do it, or am I missing something?
What we need to do - and what we do do - is this -
$tmp = <base name of subdirectory>;
$old = lstat $tmp; /* line A */
chdir $dir; /* line B */
$new = lstat "."; /* line C */
wd_sanity_check($old, $new);
> Assuming that accessing /mount/SUBDIR/. also triggers a mount on
> the other OSs, the example above should work on everything. If it
> doesn't, we might have to do two stats the first time, one on $dir and
> then one on $tmp.
On Solaris, the filesystem gets mounted at either line B or C (I'm not
sure which). Hence wd_sanity_check() needed to be changed to
understand why $old differs from $new in this case.
Other automounters mount the filesystem at A, which means that $old
and $new are the same, needing no fix.
Regards,
James.
- Re: Changes to the filesystem while find is running - comments?, (continued)
- Re: Changes to the filesystem while find is running - comments?, Tim Nelson, 2004/11/23
- Re: Changes to the filesystem while find is running - comments?, Steve Revilak, 2004/11/23
- Re: Changes to the filesystem while find is running - comments?, Tim Nelson, 2004/11/24
- Re: Changes to the filesystem while find is running - comments?,
James Youngman <=
- Re: Changes to the filesystem while find is running - comments?, Tim Nelson, 2004/11/25
- Re: Changes to the filesystem while find is running - comments?, James Youngman, 2004/11/26
- Re: Changes to the filesystem while find is running - comments?, Martin Buchholz, 2004/11/26
- Re: Changes to the filesystem while find is running - comments?, Tim Nelson, 2004/11/29
Re: Changes to the filesystem while find is running - comments?, Paul Szabo, 2004/11/22
Re: Changes to the filesystem while find is running - comments?, Paul Szabo, 2004/11/22