zsh-users
 help / color / mirror / code / Atom feed
From: DervishD <zsh@dervishd.net>
To: Shawn Halpenny <paxunix@gmail.com>
Cc: zsh-users@sunsite.dk
Subject: Re: Extract CTIME in zsh 4.2.3?
Date: Mon, 22 Aug 2005 17:35:29 +0200	[thread overview]
Message-ID: <20050822153529.GA66@DervishD> (raw)
In-Reply-To: <44613de005082208246036665e@mail.gmail.com>

    Hi Shawn and Timothy :)

 * Shawn Halpenny <paxunix@gmail.com> dixit:
> On 8/22/05, Timothy Luoma <lists@tntluoma.com> wrote:
> > I've found a solution, but this will only work with Tiger (Mac OS X
> > version 10.4.x)...
> Ahh, it wasn't clear you wanted the create-time.  In Unix (and any
> sufficiently Unix-like operating system) the "ctime" for a file is the
> last time there was a change to the file's inode and is generally
> portable.  Not all Unixes keep track of the create-time for a file, so
> any mechanism to retrieve it is almost certainly non-portable.

    In fact, it is not present in SUS. Probably it is present only
for a few filesystems, so it has to be retrieved in a non-portable
way. Under Linux, I don't recall now of any filesystem that
implements creation time for entries. It's not an operating system
problem, is a filesystem problem. Even in the case you can write
code for some UNIX flavour to retrieve that data, it will only work
for some particular filesystem. The VFS on top of that will only
store the st_atime, st_mtime and st_ctime values in the metadata.

    Another solution will be to create a dotfile or something like
that when creating the file whose creation date you want to obtain,
and make sure the file contents of that dotfile (or associated file,
whatever you call it) doesn't change. Then the st_mtime of the
associated file will be the creation time of the 'real' file. Not a
very clean solution, but...

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to...


  reply	other threads:[~2005-08-22 15:32 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
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 [this message]
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=20050822153529.GA66@DervishD \
    --to=zsh@dervishd.net \
    --cc=paxunix@gmail.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).