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 <invalid.nore...@gnu.org>
Sent: 20 May 2017 18:02:16
To: James Youngman; ade...@hotmail.com; bug-findutils@gnu.org
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