zsh-users
 help / color / mirror / code / Atom feed
From: Timothy Luoma <lists@tntluoma.com>
To: zsh-users@sunsite.dk
Subject: Re: Extract CTIME in zsh 4.2.3?
Date: Mon, 22 Aug 2005 01:27:52 -0400	[thread overview]
Message-ID: <16D53E3C-D453-414D-AB6C-3280FF5573CF@tntluoma.com> (raw)
In-Reply-To: <44613de005082113114c9f2092@mail.gmail.com>

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


  parent reply	other threads:[~2005-08-22  5:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-21 20:01 Timothy Luoma
2005-08-21 20:11 ` Shawn Halpenny
2005-08-22  4:44   ` Timothy Luoma
2005-08-22  5:27   ` Timothy Luoma [this message]
2005-08-22 15:21     ` Bart Schaefer
2005-08-22 18:44       ` SOLVED (more or less) " Timothy Luoma
2005-08-22 15:24     ` Shawn Halpenny
2005-08-22 15:35       ` DervishD
2011-07-26 15:24         ` skullnobrains

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16D53E3C-D453-414D-AB6C-3280FF5573CF@tntluoma.com \
    --to=lists@tntluoma.com \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).