Re: Compare 2 times



On Wed, 06 Jun 2012 05:50:02 -0700, loial wrote:

I have a requirement to test the creation time of a file with the current
time and raise a message if the file is more than 15 minutes old.

Platform is Unix.

I have looked at using os.path.getctime for the file creation time and
time.time() for the current time, but is this the best approach?

Most Unix filesystems don't store a "creation" time.

.



Relevant Pages

  • Re: Compare 2 times
    ... current time and raise a message if the file is more than 15 minutes ... Platform is Unix. ... The creation time is not ...
    (comp.lang.python)
  • Re: Compare 2 times
    ... current time and raise a message if the file is more than 15 minutes ... Platform is Unix. ... The creation time is not ...
    (comp.lang.python)
  • Re: nfs -- file creation ctime
    ... There is no such thing as a file creation time on UNIX. ... The subject parses as "ctime of file creation", ...
    (comp.unix.programmer)
  • Re: Directory Restriction
    ... > I am kinda new to unix and need some help for unix security. ... > Does all unix machine give all users read and excute to root directory ... You can set deafult perms in file creation as well.. ... > list and read the files in root directory. ...
    (comp.security.unix)
  • Re: show file ages -- better than ls -l
    ... heads to figure out how old the files are. ... no way to tell on UNIX how old a file is since UNIX doesn't save the file creation date. ... It's available, for free, with source code, at timothyhowe.com/software -- click on ...
    (comp.unix.shell)