bug-findutils
[Top][All Lists]
Advanced

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

Re: [bug #51069] find changes access time on directories


From: Adesh Kumar
Subject: Re: [bug #51069] find changes access time on directories
Date: Sun, 21 May 2017 05:19:06 +0000

Thanks James Youngman for excellent clarification.


I thought "find" uses only stat syscalls, but yeah I can see how that cannot 
help with directory contents. My guess is that for simple tests like iname or 
name, find does not need to read the direcotry list. Is my understanding 
correct?

So, what are the filters, other than amin, mmin and the like, for which find 
needs to read the directory contents.

Can you please also explain this for me.


Regards,

Adesh

________________________________
From: James Youngman <address@hidden>
Sent: 20 May 2017 18:02:16
To: James Youngman; address@hidden; address@hidden
Subject: [bug #51069] find changes access time on directories

Update of bug #51069 (project findutils):

             Assigned to:                    None => jay

    _______________________________________________________

Follow-up Comment #1:

The access time of the directory is being updated by the kernel when find
reads the directory to search it.  POSIX requires this.

If find offered an extension which saved and restored the st_atime in
directories, then the step of restoring the st_actime timestamp would
(unavoidably, I believe, because of the way utimes is specified) update the
st_ctime timestamp.   That is, if anything, worse.

If you want access times not to be updated, your best bet is to mount the file
system read-only, or (if the kernel is Linux) to use the noatime mount option.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?51069>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



reply via email to

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