Re: location of popup helpers question

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

 



Rick Stevens wrote:
> Uh, doesn’t “ls” show the mtime (modify time) by default?

Anne Wilson replied:
> AIUI, reading a file is an access - in fact if you open a text file anywhere 
> on your computer then close it without any change you will see the timestamp 
> get updated.  That does not mean it has been written to.

Actually, on classic Unix there are three timestamps.
http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Global_File_System_2/s1-manage-atimeconf.html
says:
    Each file inode and directory inode has three time stamps
    associated with it:

     * ctime — The last time the inode status was changed
     * mtime — The last time the file (or directory) data was modified
     * atime — The last time the file (or directory) data was accessed 

ls -l by default will show the mtime¹. So if the time reported by ls -l
changes, then the file has been written (which is not necessarily to say
that the contents have changed).

Note that atime may not be reliable on your systems, since it impacts
performance. The same link says:

    Two methods of reducing the effects of atime updating are
    available:

     * Mount with relatime (relative atime), which updates the
       atime if the previous atime update is older than the mtime or
       ctime update.
     * Mount with noatime, which disables atime updates on that file
       system. 

I think these days Fedora uses
relatime by default, so many users won’t see what you saw unless their
text editor insists on saving when closing a file.

Hope this helps,

James.

¹ See, for example,
info coreutils "What information is listed"
which says
     … print the … timestamp … normally the modification time.

-- 
E-mail:     james@ | “We completely deny the allegations, and we’re trying to
aprilcottage.co.uk | identify the alligators.”

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux