Python\'s os.path.getctime on the Mac (and under Unix in general) does not give the date when a file was created but \"the time of the last change\" (according to the docs a
By lack of a good utility, I've created crtime.
pip install crtime
Then you can use it like:
sudo crtime ./
Would print:
1552938281 /home/pascal/crtime/.gitignore
1552938281 /home/pascal/crtime/README.md
1552938281 /home/pascal/crtime/crtime
1552938281 /home/pascal/crtime/deploy.py
1552938281 /home/pascal/crtime/setup.cfg
1552938281 /home/pascal/crtime/setup.py
1552938961 /home/pascal/crtime/crtime.egg-info
1552939447 /home/pascal/crtime/.git
1552939540 /home/pascal/crtime/build
1552939540 /home/pascal/crtime/dist
Note that for large directories it will be easily 1000x faster than xstat
that is sometimes mentioned, as this creates a temporary file and then executes stat
calls for all files at once.