[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: access time of dirs changed by find but not by ls
From: |
James Youngman |
Subject: |
Re: access time of dirs changed by find but not by ls |
Date: |
Fri, 27 Jun 2003 10:21:51 +0100 |
User-agent: |
Mutt/1.3.28i |
On Thu, Jun 26, 2003 at 03:34:10PM +0800, Dan Jacobson wrote:
> The following message is a courtesy copy of an article
> that has been posted to comp.unix.shell as well.
>
> If I do cat a/b/c/file, the access time of a, b, c are not changed, as
> seen with stat(1). OK, as others mentioned, that is for efficiency,
> etc. Then why are they changed with find(1), as can be seen with
> find a -amin -1, at least here on GNU/Linux?
It's because find(1) calls opendir() and readdir() on a, a/b and a/b/c
while cat(1) doesn't.