Skip to main content

crtime: get creation time of files for any platform and no external dependencies.

Project description



Get creation time of files for any platform and no external dependencies.


Linux requires sudo! There is no way to avoid this, as creation time is not exposed by the kernel.

It uses debugfs to mount the filesystem, as the information is actually contained on most linux platforms.

Speed: because it does one query for a whole directory, it is roughly 1000x faster than any other method (such as the xstat utility that can be found online).


pip install crtime


In a shell:

crtime .
# 1552938709\

In Python

from crtime import get_crtimes_in_dir

for fname, date in get_crtimes_in_dir(".", raise_on_error=True, as_epoch=False):
    print(fname, date)
# Mon Mar 18 20:51:18 CET 2019

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for crtime, version 0.0.6
Filename, size File type Python version Upload date Hashes
Filename, size crtime-0.0.6-py2.py3-none-any.whl (3.2 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size crtime-0.0.6.tar.gz (3.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page