[LUGSB] finding the 'file creation date'
Erez Zadok
ezk at cs.sunysb.edu
Fri Nov 21 10:41:27 EST 2003
In message <1069400475.25425.27.camel at a-rh8.fsl.cs.sunysb.edu>, Devaki Kulkarni writes:
> Nope. Theres no way to get the file creation time. Its not stored
> anywhere. stat used with ctime gives the creation time of the file. This
> is true if the file system supports it. I dont think Unix fs supports
> it.
Originally, ctime was supposed to be (C)reation time. And in fact it is,
until you change the inode (say, chmod/chown/chgrp). Once you do that,
ctime is overwritten.
So when you ask people what does 'c' stand for nowadays, they give you a
weak story: (C)hange inode Time.
I'd have much preferred to see the original, immutable creation time of a
file; there are lots of useful applications to that. In comparison, the
inode change time not very useful, certainly much less useful than mtime and
atime. The only solution nowadays will have to be in augmenting the f/s to
store true creation time in some auxiliary database (or an extended
attribute), or redesigning disk-based f/s to support a fourth time field.
Erez.
>From addmarti at ic.sunysb.edu Fri Nov 21 11:22:18 2003
Received: from mail.ic.sunysb.edu (mail.ic.sunysb.edu [129.49.1.4])
hALGMIWh012950
for <lugsb at fsl.cs.sunysb.edu>; Fri, 21 Nov 2003 11:22:18 -0500
Received: from postal.ic.sunysb.edu (mail [129.49.1.4])
by mail.ic.sunysb.edu (8.12.10/8.12.10) with SMTP id hALGMnap026235
for <lugsb at fsl.cs.sunysb.edu>; Fri, 21 Nov 2003 11:22:51 -0500 (EST)
Received: from smtp.ic.sunysb.edu ([129.49.1.24])
by postal.ic.sunysb.edu (SAVSMTP 3.1.1.32) with SMTP id M2003112111225116162
for <lugsb at fsl.cs.sunysb.edu>; Fri, 21 Nov 2003 11:22:51 -0500
Received: from sparky.ic.sunysb.edu (sparky.ic.sunysb.edu [129.49.1.3])
by smtp.ic.sunysb.edu (8.12.10/8.12.10) with ESMTP id hALGMp0h026258
for <lugsb at fsl.cs.sunysb.edu>; Fri, 21 Nov 2003 11:22:51 -0500 (EST)
Received: from localhost (addmarti at localhost)
by sparky.ic.sunysb.edu (8.12.10/8.12.9) with ESMTP id hALGMpuc015301
for <lugsb at fsl.cs.sunysb.edu>; Fri, 21 Nov 2003 11:22:51 -0500 (EST)
Date: Fri, 21 Nov 2003 11:22:50 -0500 (EST)
From: Adam David Alan Martin <addmarti at ic.sunysb.edu>
To: Linux Users Group at Stony Brook <lugsb at fsl.cs.sunysb.edu>
Subject: Re: [LUGSB] finding the 'file creation date'
In-Reply-To: <Pine.SOL.4.58.0311210200570.26294 at sparky.ic.sunysb.edu>
Message-ID: <Pine.SOL.4.58.0311211113590.12965 at sparky.ic.sunysb.edu>
References: <200311191745.hAJHjtdB006568 at agora.fsl.cs.sunysb.edu>
<Pine.SOL.4.58.0311210200570.26294 at sparky.ic.sunysb.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-BeenThere: lugsb at fsl.cs.sunysb.edu
X-Mailman-Version: 2.1.1
Precedence: list
Reply-To: Linux Users Group at Stony Brook <lugsb at fsl.cs.sunysb.edu>
List-Id: Linux Users Group at Stony Brook <lugsb.fsl.cs.sunysb.edu>
List-Unsubscribe: <http://www.fsl.cs.sunysb.edu/mailman/listinfo/lugsb>,
<mailto:lugsb-request at fsl.cs.sunysb.edu?subject=unsubscribe>
List-Archive: <http://lists.fsl.cs.sunysb.edu/pipermail/lugsb>
List-Post: <mailto:lugsb at fsl.cs.sunysb.edu>
List-Help: <mailto:lugsb-request at fsl.cs.sunysb.edu?subject=help>
List-Subscribe: <http://www.fsl.cs.sunysb.edu/mailman/listinfo/lugsb>,
<mailto:lugsb-request at fsl.cs.sunysb.edu?subject=subscribe>
X-List-Received-Date: Fri, 21 Nov 2003 16:22:19 -0000
On Fri, 21 Nov 2003, Erhan H Senlik wrote:
>
> How do I find file creation date, even after the modification or changes.?
>
> I know that ls -l shows the last modified time, ls -lu shows the
> last accessed time, and ls -lc shows the last status change time.
>
> Is there a way to get it? Maybe FSL ppl can help me out here :)
As Erhan and Prof Zadok said, UNIX only had 3 times "ctime" "mtime" and
"atime". Change time (As it means now. See Zadok's reply for all about this.),
Modify time, and Access time. As such, I do not believe that ALL
Unix-type file systems will provide a mechanism for even RECORDING a file's
creation time. I do not think this information will be accessible from a
typical 'ls' command, as it's not standard-Unix. If you're using a filesystem
that records a creation time, there may be some kind of tool associated with
that filesystem, to read such data.
It's been a while, but I believe ext/2 (And then by implication ext/3) save
a fourth time. This may be the creation time, or something totally different.
Again, I haven't really looked at ext/2's implementation in quite some time,
so I may be confusing it with something else. I do know that there is at least
ONE filesystem available to Linux kernels, that DOES have immutable creation
time, I've just forgotten which it is.
Hopefully others on the list may know more.
--
Adam Martin
>From ezk at fsl.cs.sunysb.edu Fri Nov 21 12:12:33 2003
Received: from agora.fsl.cs.sunysb.edu
(IDENT:hx/3XJ9nVA2ZHqQ1pDQ2mpaYu2HfhLgP at agora.fsl.cs.sunysb.edu
[130.245.126.12])hALHCXWh013285
for <lugsb at fsl.cs.sunysb.edu>; Fri, 21 Nov 2003 12:12:33 -0500
Received: from agora.fsl.cs.sunysb.edu
(IDENT:g3AmptQEER12e1iJuWLJyhU5kS5jRRtC at localhost.localdomain [127.0.0.1])
hALHD5g9019009
for <lugsb at fsl.cs.sunysb.edu>; Fri, 21 Nov 2003 12:13:05 -0500
Received: (from ezk at localhost)
by agora.fsl.cs.sunysb.edu (8.12.8/8.12.8/Submit) id hALHD58Q019005;
Fri, 21 Nov 2003 12:13:05 -0500
Date: Fri, 21 Nov 2003 12:13:05 -0500
Message-Id: <200311211713.hALHD58Q019005 at agora.fsl.cs.sunysb.edu>
From: Erez Zadok <ezk at cs.sunysb.edu>
To: Linux Users Group at Stony Brook <lugsb at fsl.cs.sunysb.edu>
Subject: Re: [LUGSB] finding the 'file creation date'
In-reply-to: Your message of "Fri, 21 Nov 2003 11:22:50 EST."
<Pine.SOL.4.58.0311211113590.12965 at sparky.ic.sunysb.edu>
X-MailKey: Erez_Zadok
X-BeenThere: lugsb at fsl.cs.sunysb.edu
X-Mailman-Version: 2.1.1
Precedence: list
Reply-To: Linux Users Group at Stony Brook <lugsb at fsl.cs.sunysb.edu>
List-Id: Linux Users Group at Stony Brook <lugsb.fsl.cs.sunysb.edu>
List-Unsubscribe: <http://www.fsl.cs.sunysb.edu/mailman/listinfo/lugsb>,
<mailto:lugsb-request at fsl.cs.sunysb.edu?subject=unsubscribe>
List-Archive: <http://lists.fsl.cs.sunysb.edu/pipermail/lugsb>
List-Post: <mailto:lugsb at fsl.cs.sunysb.edu>
List-Help: <mailto:lugsb-request at fsl.cs.sunysb.edu?subject=help>
List-Subscribe: <http://www.fsl.cs.sunysb.edu/mailman/listinfo/lugsb>,
<mailto:lugsb-request at fsl.cs.sunysb.edu?subject=subscribe>
X-List-Received-Date: Fri, 21 Nov 2003 17:12:33 -0000
In message <Pine.SOL.4.58.0311211113590.12965 at sparky.ic.sunysb.edu>, Adam David Alan Martin writes:
>
> On Fri, 21 Nov 2003, Erhan H Senlik wrote:
>
> >
> > How do I find file creation date, even after the modification or changes.?
> >
> > I know that ls -l shows the last modified time, ls -lu shows the
> > last accessed time, and ls -lc shows the last status change time.
> >
> > Is there a way to get it? Maybe FSL ppl can help me out here :)
>
>
> As Erhan and Prof Zadok said, UNIX only had 3 times "ctime" "mtime" and
> "atime". Change time (As it means now. See Zadok's reply for all about this.),
> Modify time, and Access time. As such, I do not believe that ALL
> Unix-type file systems will provide a mechanism for even RECORDING a file's
> creation time. I do not think this information will be accessible from a
> typical 'ls' command, as it's not standard-Unix. If you're using a filesystem
> that records a creation time, there may be some kind of tool associated with
> that filesystem, to read such data.
You're right. File systems and OSs simply didn't design that field in.
That's why it's been like that for 20+ years. But in the last 2 years there
have been major movements to resolve the whole POSIX ACL/EA fiasco, and
finally several OSs are implementing it (NFSv4 is a big push toward that).
With EAs available in more OSs each year, it'd be feasible to add an orig
creation time that'd be supported by many of them.
BTW, we have a project that plans to transparently add EA support to file
systems, even if they don't support it natively. See
http://www.fsl.cs.sunysb.edu/project-extattrfs.html
> It's been a while, but I believe ext/2 (And then by implication ext/3) save
> a fourth time. This may be the creation time, or something totally different.
> Again, I haven't really looked at ext/2's implementation in quite some time,
> so I may be confusing it with something else. I do know that there is at least
> ONE filesystem available to Linux kernels, that DOES have immutable creation
> time, I've just forgotten which it is.
I believe its the dtime field, where they record the time when the inode was
(D)eleted. So if one wants to, one can hack ext2/3 to store orig-ctime in
there. However, that field isn't exposed to syscalls, so you'd have to
create a different kind of l/stat(2) that'd return that field's value.
Erez.
>From sybatter at yahoo.com Fri Nov 21 13:40:30 2003
Received: from web21005.mail.yahoo.com (web21005.mail.yahoo.com
[216.136.227.59])hALIeTWh014095
for <lugsb at fsl.cs.sunysb.edu>; Fri, 21 Nov 2003 13:40:30 -0500
Message-ID: <20031121184058.23459.qmail at web21005.mail.yahoo.com>
Received: from [129.49.12.9] by web21005.mail.yahoo.com via HTTP;
Fri, 21 Nov 2003 10:40:58 PST
Date: Fri, 21 Nov 2003 10:40:58 -0800 (PST)
From: Yi Suo <sybatter at yahoo.com>
To: LUGSB <lugsb at fsl.cs.sunysb.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Subject: [LUGSB] What is ext/0, ext/1, ext/2...?
X-BeenThere: lugsb at fsl.cs.sunysb.edu
X-Mailman-Version: 2.1.1
Precedence: list
Reply-To: Linux Users Group at Stony Brook <lugsb at fsl.cs.sunysb.edu>
List-Id: Linux Users Group at Stony Brook <lugsb.fsl.cs.sunysb.edu>
List-Unsubscribe: <http://www.fsl.cs.sunysb.edu/mailman/listinfo/lugsb>,
<mailto:lugsb-request at fsl.cs.sunysb.edu?subject=unsubscribe>
List-Archive: <http://lists.fsl.cs.sunysb.edu/pipermail/lugsb>
List-Post: <mailto:lugsb at fsl.cs.sunysb.edu>
List-Help: <mailto:lugsb-request at fsl.cs.sunysb.edu?subject=help>
List-Subscribe: <http://www.fsl.cs.sunysb.edu/mailman/listinfo/lugsb>,
<mailto:lugsb-request at fsl.cs.sunysb.edu?subject=subscribe>
X-List-Received-Date: Fri, 21 Nov 2003 18:40:30 -0000
I noticed in the other thread ext/0, ext/1, ext/2 etc.
are discussed. Are they swap drives or something else?
__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/
>From scallana at ic.sunysb.edu Fri Nov 21 14:38:13 2003
Received: from mail.ic.sunysb.edu (mail.ic.sunysb.edu [129.49.1.4])
hALJcDWh014961
for <lugsb at fsl.cs.sunysb.edu>; Fri, 21 Nov 2003 14:38:13 -0500
Received: from postal.ic.sunysb.edu (mail [129.49.1.4])
by mail.ic.sunysb.edu (8.12.10/8.12.10) with SMTP id hALJcWav004484
for <lugsb at fsl.cs.sunysb.edu>; Fri, 21 Nov 2003 14:38:46 -0500 (EST)
Received: from smtp.ic.sunysb.edu ([129.49.1.24])
by postal.ic.sunysb.edu (SAVSMTP 3.1.1.32) with SMTP id M2003112114384524810
for <lugsb at fsl.cs.sunysb.edu>; Fri, 21 Nov 2003 14:38:45 -0500
Received: from ic.sunysb.edu (odhcp48.oslab.cs.sunysb.edu [130.245.127.248])
by smtp.ic.sunysb.edu (8.12.10/8.12.10) with ESMTP id hALJcj0h004564
for <lugsb at fsl.cs.sunysb.edu>; Fri, 21 Nov 2003 14:38:45 -0500 (EST)
Message-ID: <3FBE69C0.2020108 at ic.sunysb.edu>
Date: Fri, 21 Nov 2003 14:38:40 -0500
From: Sean Callanan <scallana at ic.sunysb.edu>
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US;
rv:1.5) Gecko/20031007
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Linux Users Group at Stony Brook <lugsb at fsl.cs.sunysb.edu>
Subject: Re: [LUGSB] What is ext/0, ext/1, ext/2...?
References: <20031121184058.23459.qmail at web21005.mail.yahoo.com>
In-Reply-To: <20031121184058.23459.qmail at web21005.mail.yahoo.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: lugsb at fsl.cs.sunysb.edu
X-Mailman-Version: 2.1.1
Precedence: list
Reply-To: Linux Users Group at Stony Brook <lugsb at fsl.cs.sunysb.edu>
List-Id: Linux Users Group at Stony Brook <lugsb.fsl.cs.sunysb.edu>
List-Unsubscribe: <http://www.fsl.cs.sunysb.edu/mailman/listinfo/lugsb>,
<mailto:lugsb-request at fsl.cs.sunysb.edu?subject=unsubscribe>
List-Archive: <http://lists.fsl.cs.sunysb.edu/pipermail/lugsb>
List-Post: <mailto:lugsb at fsl.cs.sunysb.edu>
List-Help: <mailto:lugsb-request at fsl.cs.sunysb.edu?subject=help>
List-Subscribe: <http://www.fsl.cs.sunysb.edu/mailman/listinfo/lugsb>,
<mailto:lugsb-request at fsl.cs.sunysb.edu?subject=subscribe>
X-List-Received-Date: Fri, 21 Nov 2003 19:38:13 -0000
Hello!
The reference is to ext2fs (the Second Extended Filesystem, long the
default FS for Linux systems) and ext3, the journalling extension to this.
Sean
>I noticed in the other thread ext/0, ext/1, ext/2 etc.
>are discussed. Are they swap drives or something else?
>
>
More information about the lugsb
mailing list