Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Extract CTIME in zsh 4.2.3?
- X-seq: zsh-users 9337
- From: Timothy Luoma <lists@xxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Extract CTIME in zsh 4.2.3?
- Date: Mon, 22 Aug 2005 01:27:52 -0400
- In-reply-to: <44613de005082113114c9f2092@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <95E667D6-6AE4-4CDA-B420-30033315C886@xxxxxxxxxxxx> <44613de005082113114c9f2092@xxxxxxxxxxxxxx>
I've found a solution, but this will only work with Tiger (Mac OS X
version 10.4.x)...
http://developer.apple.com/macosx/spotlight.html
kMDItemFSCreationDate The date an item's file was created.
kMDItemContentCreationDate The date an item's content was created.
The first tells you when the file was first created. The second
tells you when content was added to it (this is probably identical in
most circumstances)
This is how you get to it:
$ mdls FILENAME |\
grep "^kMDItemContentCreationDate"
kMDItemContentCreationDate = 2005-08-20 00:47:41 -0400
And this is how I'd get just the date:
$ mdls FILENAME |\
awk -F" " '/kMDItemFSCreationDate/{print $3}'
2005-08-20
If there's a more portable way to get this to work, I'd like to learn
about it, but this will work for now.
TjL
Messages sorted by:
Reverse Date,
Date,
Thread,
Author