[LUGSB] finding the 'file creation date'
Adam David Alan Martin
addmarti at ic.sunysb.edu
Sun Nov 23 23:36:11 EST 2003
All,
On Fri, 21 Nov 2003, Erez Zadok wrote:
> 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
Cool! I think I'll mess around with this a while... See what I can break :-)
>
> > 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.
Yeah. You're right. Thanks, Prof. Zadok. But I think messing with the dtime
might mung up the e2fsck. I've seen it check bad dtimes on inodes, now that
you mention it. Ext/2 appears to have some extra bits kicking around in the
permissions field.... perhaps there's enough there to put together a pointer
to an attrib file, or something with this data.... but that reminds me too
much of the extended-filenames hack on vfat32.... Probably better to just
do a good re-implementation from the start.
>
> Erez.
> _______________________________________________
> lugsb mailing list
> lugsb at fsl.cs.sunysb.edu
> http://www.fsl.cs.sunysb.edu/mailman/listinfo/lugsb
>
--
Adam Martin
>From sybatter at yahoo.com Mon Nov 24 00:56:31 2003
Received: from web21005.mail.yahoo.com (web21005.mail.yahoo.com
[216.136.227.59])hAO5uUHn011530
for <lugsb at fsl.cs.sunysb.edu>; Mon, 24 Nov 2003 00:56:31 -0500
Message-ID: <20031124055630.81891.qmail at web21005.mail.yahoo.com>
Received: from [130.245.234.237] by web21005.mail.yahoo.com via HTTP;
Sun, 23 Nov 2003 21:56:30 PST
Date: Sun, 23 Nov 2003 21:56:30 -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] A Windows user's habit is not healthy in Linux
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: Mon, 24 Nov 2003 05:56:31 -0000
I've been using Windows for years now. This year I
switched to Linux for a change. I thought this is a
funny experience so I decided to share with everybody.
I was installing the java plugin for mozilla. When I
downloaded that .bin file from Sun, doing like what a
Windows user always did, I kept trying to run that
file which was claimed to be executable by Sun by
typing the file name and of course it didn't work.
It took me a whole day to finally realize all I needed
to do was to type 'sh
j2re-1_4_2_02-linux-i586-rpm.bin' and hit enter. :)
Then I also figured out that sh works with any
executable file such as configure, make or shell
script. So it was all good in the end. :)
__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/
>From vinay at mnl.cs.sunysb.edu Mon Nov 24 02:10:24 2003
Received: from gateway (mail@[130.245.128.9])hAO7AOHn012417
for <lugsb at fsl.cs.sunysb.edu>; Mon, 24 Nov 2003 02:10:24 -0500
Received: from linux11.mnl.cs.sunysb.edu
([130.245.145.69] helo=linux11 ident=mail)
by gateway with esmtp (Exim 3.35 #1 (Debian))
id 1AOArd-0004vr-00
for <lugsb at fsl.cs.sunysb.edu>; Mon, 24 Nov 2003 02:10:29 -0500
Received: from vinay (helo=localhost)
by linux11 with local-esmtp (Exim 4.24)
id 1AOArd-0005Eh-Rx
for lugsb at fsl.cs.sunysb.edu; Mon, 24 Nov 2003 02:10:29 -0500
Date: Mon, 24 Nov 2003 02:10:29 -0500 (EST)
From: Vinay Pai <vinay at cs.sunysb.edu>
X-X-Sender: vinay at linux11
To: Linux Users Group at Stony Brook <lugsb at fsl.cs.sunysb.edu>
Subject: Re: [LUGSB] A Windows user's habit is not healthy in Linux
In-Reply-To: <20031124055630.81891.qmail at web21005.mail.yahoo.com>
Message-ID: <Pine.LNX.4.56.0311240206130.20045 at linux11>
References: <20031124055630.81891.qmail at web21005.mail.yahoo.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: Vinay Pai <vinay at linux11>
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: Mon, 24 Nov 2003 07:10:25 -0000
That would work for shell scripts. Scripts may also be in Perl or Python
or whatver. The interpreter used it defined by the first line the
"shabang"
#!/bin/sh
or
#!/usr/bin/perl
or whatever
You can execute it by setting the executable flag and running it as
./j2re.....bin
Some people also put "." in their path, but I personally think thats a bad
idea.
Vinay
On Sun, 23 Nov 2003, Yi Suo wrote:
> I've been using Windows for years now. This year I
> switched to Linux for a change. I thought this is a
> funny experience so I decided to share with everybody.
>
> I was installing the java plugin for mozilla. When I
> downloaded that .bin file from Sun, doing like what a
> Windows user always did, I kept trying to run that
> file which was claimed to be executable by Sun by
> typing the file name and of course it didn't work.
>
> It took me a whole day to finally realize all I needed
> to do was to type 'sh
> j2re-1_4_2_02-linux-i586-rpm.bin' and hit enter. :)
> Then I also figured out that sh works with any
> executable file such as configure, make or shell
> script. So it was all good in the end. :)
>
> __________________________________
> Do you Yahoo!?
> Free Pop-Up Blocker - Get it now
> http://companion.yahoo.com/
> _______________________________________________
> lugsb mailing list
> lugsb at fsl.cs.sunysb.edu
> http://www.fsl.cs.sunysb.edu/mailman/listinfo/lugsb
>
>From scallana at ic.sunysb.edu Mon Nov 24 12:33:01 2003
Received: from mail.ic.sunysb.edu (mail.ic.sunysb.edu [129.49.1.4])
hAOHX1Hn019830
for <lugsb at fsl.cs.sunysb.edu>; Mon, 24 Nov 2003 12:33:01 -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 hAOHWgb3011551
for <lugsb at fsl.cs.sunysb.edu>; Mon, 24 Nov 2003 12:33:07 -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 M2003112412330603109
for <lugsb at fsl.cs.sunysb.edu>; Mon, 24 Nov 2003 12:33:06 -0500
Received: from ic.sunysb.edu (080-180.dialup.sunysb.edu [129.49.80.180])
by smtp.ic.sunysb.edu (8.12.10/8.12.10) with ESMTP id hAOHX50h011802
for <lugsb at fsl.cs.sunysb.edu>; Mon, 24 Nov 2003 12:33:06 -0500 (EST)
Message-ID: <3FC240D1.6020703 at ic.sunysb.edu>
Date: Mon, 24 Nov 2003 12:33:05 -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] A Windows user's habit is not healthy in Linux
References: <20031124055630.81891.qmail at web21005.mail.yahoo.com>
In-Reply-To: <20031124055630.81891.qmail at web21005.mail.yahoo.com>
Content-Type: text/plain; charset=ISO-8859-1; 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: Mon, 24 Nov 2003 17:33:02 -0000
In general, even shell scripts can be executed without prefixing "sh".
Use "head -1 {filename}" to see if the first line is
#!{...}
where {...} is the path to a shell (or, sometimes, the Perl
interpreter). If that is the case, then you can simply type
chmod u+x {filename}
and from then on use {filename} like an executable.
Sean
More information about the lugsb
mailing list