I use a file’s age for many things, especially when it comes to monitoring servers with nagios. Every language has their own modules to do these things, so here is my quick example to calculate a file’s age with Python. import os from datetime import datetime stat = os.stat('/etc/php.ini') fileage = datetime.fromtimestamp(stat.st_mtime) now = datetime.now() [...]
Calculate file age in Python.