Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15101 > unrolled thread

Re: file access time and file modification time

Started byChet Ramey <chet.ramey@case.edu>
First post2019-07-09 14:11 -0400
Last post2019-07-09 14:11 -0400
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: file access time and file modification time Chet Ramey <chet.ramey@case.edu> - 2019-07-09 14:11 -0400

#15101 — Re: file access time and file modification time

FromChet Ramey <chet.ramey@case.edu>
Date2019-07-09 14:11 -0400
SubjectRe: file access time and file modification time
Message-ID<mailman.697.1562695966.2688.bug-bash@gnu.org>
On 7/9/19 12:12 PM, kfm@plushkava.net wrote:

>> The code just returns (atime <= mtime), and has since 1997. It uses the
>> st_atime and st_mtime fields. I should update it to use timespecs if
>> they're available, and (mtime > atime) might work closer to your
>> expectations.
>>
>> After the call to mktemp, the atime and mtime are the same, so the test
>> returns true.
> 
> I see. Indeed, it is confusing to me because I would not consider a file whose atime and mtime are equal to have been "modified since it was last read", notwithstanding that the newborn file has not yet been read at all. I think that it would help for the documentation to address this nuance.
> 
> As for the possibility of using the timespec fields, that would be terrific.

That's already done.

And we'll try the (mtime > atime) variant as well.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web