Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
SOLVED (more or less) Re: Extract CTIME in zsh 4.2.3?
- X-seq: zsh-users 9341
- From: Timothy Luoma <lists@xxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: SOLVED (more or less) Re: Extract CTIME in zsh 4.2.3?
- Date: Mon, 22 Aug 2005 14:44:23 -0400
- In-reply-to: <1050822152140.ZM7412@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <95E667D6-6AE4-4CDA-B420-30033315C886@xxxxxxxxxxxx> <44613de005082113114c9f2092@xxxxxxxxxxxxxx> <16D53E3C-D453-414D-AB6C-3280FF5573CF@xxxxxxxxxxxx> <1050822152140.ZM7412@xxxxxxxxxxxxxxxxxxxxxxx>
Yes, from my extensive testing of one FreeBSD system, one Linux
(Gentoo) system, and one OS X system, there does not seem to be a
consistent way of getting this information.
'stat' on OS X does not seem to store the created date. That killed
the best chance for compatibility right there.
There are a couple of different ways to get it in OS X.
Tiger:
mdls "${FILES}" | awk -F'"' '/kMDItemContentType /{print $2}'
gives me
2005-08-20
If developer tools are installed:
/Developer/Tools/GetFileInfo "${FILES}" | awk -F' ' '/created: /
{print $2}'
gives me
08/20/2005
which isn't the format I wanted, so I'm sticking with 'mdls' for now.
Thanks to all who responded!
TjL
Messages sorted by:
Reverse Date,
Date,
Thread,
Author