in macOS terminal, can I display the 'added date', the creation date, and last access timestamp of a file?
2
votes
3
answers
1708
views
In the macOS terminal, when I do
ls -l SomeFile.txt
it shows most of the file's properties including its last modification timestamp.
However in Finder, besides the 'Date Modified' there is also the 'Date Added' for each file, i.e. the timestamp when the file was added to the particular folder where it's in. Is there a way to read or display this within the shell?
Also as far as I understood this Added Date is different than the file's creation date? Is there also a way to get its creation timestamp?
Lastly, macOS also keeps track of when a file was last accessed (read), can I get that timestamp from the shell as well?
So for example:
1. I create a new file on December 1st.
2. I modify the file on December 2nd.
3. I open (read) the file on December 3rd.
4. I move the file to a different folder on December 4th.
I'm looking for one or more shell commands to get these four particular timestamps.
Asked by RocketNuts
(1529 rep)
Dec 11, 2023, 09:30 AM
Last activity: Dec 11, 2023, 10:17 PM
Last activity: Dec 11, 2023, 10:17 PM