I'm trying to get a formatted time output using a such command in Mac OS X 10.7.5 (in the Terminal app):
stat -f "%m" -t "%Y" "myfilename.jpg"
However, it still gives me a unixtime, not the formatted string:
What I'm doing wrong?
You have to add S for string output.
$ stat -f %Sm -t %Y file.txt
3 years ago