Created
June 9, 2026 03:24
-
-
Save jeremy-code/1b71297cf344fd606b5d8a354df8ad43 to your computer and use it in GitHub Desktop.
Get last accessed/last modified/creation date of file with stat in macOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| TZ=UTC stat -f '%Sa' -t "%Y-%m-%dT%H:%M:%SZ" ./path/to/file.txt # last accessed | |
| TZ=UTC stat -f '%Sm' -t "%Y-%m-%dT%H:%M:%SZ" ./path/to/file.txt # last modified | |
| TZ=UTC stat -f '%SB' -t "%Y-%m-%dT%H:%M:%SZ" ./path/to/file.txt # created |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment