How to check file creation date

How to check file creation date

am 08.02.2006 02:47:46 von Moon

ls -lt just select the file last updated date. How to check file creation
date and time ?
-rw-r--r-- 1 itxxx x85 4783481 Feb 8 09:36 1510208_finger_53.prn

Re: How to check file creation date

am 08.02.2006 03:08:10 von Jean-Louis Liagre

moon wrote:
> ls -lt just select the file last updated date. How to check file creation
> date and time ?
> -rw-r--r-- 1 itxxx x85 4783481 Feb 8 09:36 1510208_finger_53.prn

You can't, it's not recorded.

Re: How to check file creation date

am 08.02.2006 03:09:24 von Barry Margolin

In article <95cGf.54$ms5.4350@ns2.gip.net>,
"moon" wrote:

> ls -lt just select the file last updated date. How to check file creation
> date and time ?
> -rw-r--r-- 1 itxxx x85 4783481 Feb 8 09:36 1510208_finger_53.prn

Standard Unix file systems don't store creation time. The only times
Unix stores for files are access time, modification time, and inode
change time.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***

Re: How to check file creation date

am 08.02.2006 03:39:56 von Moon

OK. How to Get those information ?

"Barry Margolin" wrote in message
news:barmar-7BDC0C.21092407022006@comcast.dca.giganews.com.. .
> In article <95cGf.54$ms5.4350@ns2.gip.net>,
> "moon" wrote:
>
>> ls -lt just select the file last updated date. How to check file creation
>> date and time ?
>> -rw-r--r-- 1 itxxx x85 4783481 Feb 8 09:36 1510208_finger_53.prn
>
> Standard Unix file systems don't store creation time. The only times
> Unix stores for files are access time, modification time, and inode
> change time.
>
> --
> Barry Margolin, barmar@alum.mit.edu
> Arlington, MA
> *** PLEASE post questions in newsgroups, not directly to me ***
> *** PLEASE don't copy me on replies, I'll read them in the group ***

Re: How to check file creation date

am 08.02.2006 03:53:20 von Lew Pitcher

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Content rearranged for readability

moon wrote:
> "Barry Margolin" wrote in message
> news:barmar-7BDC0C.21092407022006@comcast.dca.giganews.com.. .
>
>>In article <95cGf.54$ms5.4350@ns2.gip.net>,
>>"moon" wrote:
>>
>>
>>>ls -lt just select the file last updated date. How to check file creation
>>>date and time ?
>>>-rw-r--r-- 1 itxxx x85 4783481 Feb 8 09:36 1510208_finger_53.prn
>>
>>Standard Unix file systems don't store creation time. The only times
>>Unix stores for files are access time, modification time, and inode
>>change time.
>
> OK. How to Get those information ?

You don't. Not unless you explicitly store it yourself somewhere.

- --
Lew Pitcher

Master Codewright & JOAT-in-training | GPG public key available on request
Registered Linux User #112576 (http://counter.li.org/)
Slackware - Because I know what I'm doing.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.7 (GNU/Linux)

iD8DBQFD6V0gagVFX4UWr64RAh3UAJwLUpMncVcPCehs4ePb7MDL3RdvIQCg moU3
R7rb59VKd+TQxOBrSCMqXa8=
=XCE/
-----END PGP SIGNATURE-----

Re: How to check file creation date

am 08.02.2006 05:49:22 von Ed Morton

Lew Pitcher wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Content rearranged for readability
>
> moon wrote:
>
>>"Barry Margolin" wrote in message
>>news:barmar-7BDC0C.21092407022006@comcast.dca.giganews.com ...
>>
>>
>>>In article <95cGf.54$ms5.4350@ns2.gip.net>,
>>>"moon" wrote:
>>>
>>>
>>>
>>>>ls -lt just select the file last updated date. How to check file creation
>>>>date and time ?
>>>>-rw-r--r-- 1 itxxx x85 4783481 Feb 8 09:36 1510208_finger_53.prn
>>>
>>>Standard Unix file systems don't store creation time. The only times
>>>Unix stores for files are access time, modification time, and inode
>>>change time.
>>
>>OK. How to Get those information ?
>
>
> You don't. Not unless you explicitly store it yourself somewhere.

I think by "those information" he probably means one or more of access
time, modification time, and inode change time. If so, he could take a
look at "stat", "ls", GNU "find", etc...

Ed.

Re: How to check file creation date

am 08.02.2006 06:13:16 von Bill Marcum

On Wed, 8 Feb 2006 10:39:56 +0800, moon
wrote:
> "Barry Margolin" wrote in message
> news:barmar-7BDC0C.21092407022006@comcast.dca.giganews.com.. .
>>
>> Standard Unix file systems don't store creation time. The only times
>> Unix stores for files are access time, modification time, and inode
>> change time.
>
> OK. How to Get those information ?
>
man ls
ls -lu
ls -l
ls -lc


--
When the weight of the paperwork equals the weight of the plane, the
plane will fly.
-- Donald Douglas

Re: How to check file creation date

am 08.02.2006 09:54:21 von Peter Terpstra

Bill Marcum zat achter de pc en typte:

> man ls
> ls -lu
> ls -l
> ls -lc


A nice one is also the `--fulltime' option.

Or `date -r filename'

Peter

--
http://k6.xs4all.nl mailto:peter@k6.xs4all.nl

Re: How to check file creation date

am 08.02.2006 10:07:19 von cfajohnson

On 2006-02-08, Peter Terpstra wrote:
> Bill Marcum zat achter de pc en typte:
>
>> man ls
>> ls -lu
>> ls -l
>> ls -lc
>
>
> A nice one is also the `--fulltime' option.
>
> Or `date -r filename'

Both of which are limited to the GNU versions of those utilities.

--
Chris F.A. Johnson, author |
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence

Re: How to check file creation date

am 08.02.2006 15:05:20 von suresh

moon wrote:
> ls -lt just select the file last updated date. How to check file creation
> date and time ?
> -rw-r--r-- 1 itxxx x85 4783481 Feb 8 09:36 1510208_finger_53.prn
ANS



->As per the ur Query U can try this
-> Example :Now I wnat to display the files which are created on Feb 8

->ls -lrt|grep "Feb 8"

Re: How to check file creation date

am 08.02.2006 15:24:16 von Lew Pitcher

Suresh wrote:
> moon wrote:
>> ls -lt just select the file last updated date. How to check file creation
>> date and time ?
>> -rw-r--r-- 1 itxxx x85 4783481 Feb 8 09:36 1510208_finger_53.prn
> ANS
>
>
>
> ->As per the ur Query U can try this
> -> Example :Now I wnat to display the files which are created on Feb 8
>
> ->ls -lrt|grep "Feb 8"

Which gets you the files that were /last modified/ on Feb 8, not files
that were /created/ on Feb 8.


--

Lew Pitcher, IT Specialist, Corporate Technology Solutions,
Enterprise Technology Solutions, TD Bank Financial Group

(Opinions expressed here are my own, not my employer's)

Re: How to check file creation date

am 08.02.2006 15:49:31 von Ed Morton

Lew Pitcher wrote:
> Suresh wrote:
>
>>moon wrote:
>>
>>>ls -lt just select the file last updated date. How to check file creation
>>>date and time ?
>>>-rw-r--r-- 1 itxxx x85 4783481 Feb 8 09:36 1510208_finger_53.prn
>>
>>ANS
>>
>>
>>
>>->As per the ur Query U can try this
>>-> Example :Now I wnat to display the files which are created on Feb 8
>>
>>->ls -lrt|grep "Feb 8"
>
>
> Which gets you the files that were /last modified/ on Feb 8, not files
> that were /created/ on Feb 8.
>

and files that were unlucky enough to have "Feb 8" in their name.

Ed.

Re: How to check file creation date

am 11.02.2006 00:00:32 von Dan Mercer

"Lew Pitcher" wrote in message news:kanGf.24163$1e5.497322@news20.bellglobal.com...
: Suresh wrote:
: > moon wrote:
: >> ls -lt just select the file last updated date. How to check file creation
: >> date and time ?
: >> -rw-r--r-- 1 itxxx x85 4783481 Feb 8 09:36 1510208_finger_53.prn
: > ANS
: >
: >
: >
: > ->As per the ur Query U can try this
: > -> Example :Now I wnat to display the files which are created on Feb 8
: >
: > ->ls -lrt|grep "Feb 8"
:
: Which gets you the files that were /last modified/ on Feb 8, not files
: that were /created/ on Feb 8.

As a general point, you can't find a creation date for a file on
UNIX because the cobcept is meaningless. You usually only see that
question from mainframers where the creation date is the date the
dataset was allocated. UNIX's filesystem is vastly different. What
would you even choose for a creation date? The time the inode was
allocated? What about tar then? You could have files with access and
write times older than creation date. How about the time the directory
entry was made? Well then, you'd have some linked files with
multiple creation times.

If you can't define what you want, of what good is it?

Dan Mercer

:
:
: --
:
: Lew Pitcher, IT Specialist, Corporate Technology Solutions,
: Enterprise Technology Solutions, TD Bank Financial Group
:
: (Opinions expressed here are my own, not my employer's)

Re: How to check file creation date

am 11.02.2006 00:34:14 von cfajohnson

On 2006-02-10, Dan Mercer wrote:
>
> "Lew Pitcher" wrote in message news:kanGf.24163$1e5.497322@news20.bellglobal.com...
>: Suresh wrote:
>: > moon wrote:
>: >> ls -lt just select the file last updated date. How to check file creation
>: >> date and time ?
>: >> -rw-r--r-- 1 itxxx x85 4783481 Feb 8 09:36 1510208_finger_53.prn
>: > ANS
>: >
>: > ->As per the ur Query U can try this
>: > -> Example :Now I wnat to display the files which are created on Feb 8
>: >
>: > ->ls -lrt|grep "Feb 8"
>:
>: Which gets you the files that were /last modified/ on Feb 8, not files
>: that were /created/ on Feb 8.
>
> As a general point, you can't find a creation date for a file on
> UNIX because the cobcept is meaningless.

Not at all.

> You usually only see that question from mainframers where the
> creation date is the date the dataset was allocated.

I worked on a system (8086, not mainframe, nor Unix) in which the
creation dates were recorded. A file listing gave both creation
time and modification times.

> UNIX's filesystem is vastly different. What would you even choose
> for a creation date?

Take your pick. Once you have chosen, implement it.

> The time the inode was allocated?

Good idea.

> What about tar then?

_What_ about tar?

> You could have files with access and write times older than creation
> date.

How?

> How about the time the directory entry was made? Well then,
> you'd have some linked files with multiple creation times.

If that's what you want, then that can be implemented. If not, do
it differently.

> If you can't define what you want, of what good is it?

Of course you can define it. You have to make a decision which of
various possible definitions you are going to use.

--
Chris F.A. Johnson, author |
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence

Re: How to check file creation date

am 11.02.2006 18:49:02 von Dan Mercer

"Chris F.A. Johnson" wrote in message news:mgkvb3-dlb.ln1@teksavvy.com...
: On 2006-02-10, Dan Mercer wrote:
: >
: > "Lew Pitcher" wrote in message news:kanGf.24163$1e5.497322@news20.bellglobal.com...
: >: Suresh wrote:
: >: > moon wrote:
: >: >> ls -lt just select the file last updated date. How to check file creation
: >: >> date and time ?
: >: >> -rw-r--r-- 1 itxxx x85 4783481 Feb 8 09:36 1510208_finger_53.prn
: >: > ANS
: >: >
: >: > ->As per the ur Query U can try this
: >: > -> Example :Now I wnat to display the files which are created on Feb 8
: >: >
: >: > ->ls -lrt|grep "Feb 8"
: >:
: >: Which gets you the files that were /last modified/ on Feb 8, not files
: >: that were /created/ on Feb 8.
: >
: > As a general point, you can't find a creation date for a file on
: > UNIX because the concept is meaningless.
:
: Not at all.
:
: > You usually only see that question from mainframers where the
: > creation date is the date the dataset was allocated.
:
: I worked on a system (8086, not mainframe, nor Unix) in which the
: creation dates were recorded. A file listing gave both creation
: time and modification times.
:
: > UNIX's filesystem is vastly different. What would you even choose
: > for a creation date?
:
: Take your pick. Once you have chosen, implement it.
:
: > The time the inode was allocated?
:
: Good idea.
:
: > What about tar then?
:
: _What_ about tar?
:
: > You could have files with access and write times older than creation
: > date.
:
: How?

Because tar preserves and restores file times unless you override
the default behavior.

And what happens on a move? You will get conflicting creation
times depending on whether a file system was crossed.
:
: > How about the time the directory entry was made? Well then,
: > you'd have some linked files with multiple creation times.
:
: If that's what you want, then that can be implemented. If not, do
: it differently.
:
: > If you can't define what you want, of what good is it?
:
: Of course you can define it. You have to make a decision which of
: various possible definitions you are going to use.

And then you have to modify the filesystem to support it, as well
as all filesystem utilities, system calls. And to what end.
What will it tell you that is worth the effort of making the
change? If you could come up with a reasonable definition and some
concrete notion of how the creation time would be used, I suppose it
could be rolled into the work effort when UNIX times go 64 bit
(Thankfully, I should be retired by then). (Unless, of course,
the powers that be simply don't decide to roll forward the
epoch date to say, 2000 - a reasonable kludge.

Dan Mercer

:
: --
: Chris F.A. Johnson, author |
: Shell Scripting Recipes: | My code in this post, if any,
: A Problem-Solution Approach | is released under the
: 2005, Apress | GNU General Public Licence

Re: How to check file creation date

am 12.02.2006 01:54:47 von Lew Pitcher

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dan Mercer wrote:
> "Lew Pitcher" wrote in message news:kanGf.24163$1e5.497322@news20.bellglobal.com...
> : Suresh wrote:
> : > moon wrote:
> : >> ls -lt just select the file last updated date. How to check file creation
> : >> date and time ?
> : >> -rw-r--r-- 1 itxxx x85 4783481 Feb 8 09:36 1510208_finger_53.prn
> : > ANS
> : >
> : >
> : >
> : > ->As per the ur Query U can try this
> : > -> Example :Now I wnat to display the files which are created on Feb 8
> : >
> : > ->ls -lrt|grep "Feb 8"
> :
> : Which gets you the files that were /last modified/ on Feb 8, not files
> : that were /created/ on Feb 8.
>
> As a general point, you can't find a creation date for a file on
> UNIX because the cobcept is meaningless.

Agreed. As has been pointed out a couple of times upthread, including a hint
at it in one of my posts.

As for the grep, it still won't find files that were /created/ on Feb 8, because
1) the filesystem doesn't record file creation dates
2) the ls command given isn't showing file creation dates (it is showing
"last modification" dates, and
3) there is no guarantee that the string "Feb 8" will appear exclusively in
the file date field of the ls output; it /could/ be part of the filename.


- --
Lew Pitcher

Master Codewright & JOAT-in-training | GPG public key available on request
Registered Linux User #112576 (http://counter.li.org/)
Slackware - Because I know what I'm doing.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.7 (GNU/Linux)

iD8DBQFD7odXagVFX4UWr64RAm8uAKDIkbHjtKcyrmwzeyc6PiNTlFe17gCf XQPZ
Zz7JUSCy79dnd26rbfL0w+8=
=ZHMp
-----END PGP SIGNATURE-----

Re: How to check file creation date

am 15.02.2006 01:51:32 von Keith Thompson

"Dan Mercer" writes:
> "Chris F.A. Johnson" wrote in message
> news:mgkvb3-dlb.ln1@teksavvy.com...
> > On 2006-02-10, Dan Mercer wrote:
[...]
> > > If you can't define what you want, of what good is it?
> >
> > Of course you can define it. You have to make a decision which of
> > various possible definitions you are going to use.
>
> And then you have to modify the filesystem to support it, as well
> as all filesystem utilities, system calls. And to what end.
> What will it tell you that is worth the effort of making the
> change? If you could come up with a reasonable definition and some
> concrete notion of how the creation time would be used, I suppose it
> could be rolled into the work effort when UNIX times go 64 bit
> (Thankfully, I should be retired by then). (Unless, of course,
> the powers that be simply don't decide to roll forward the
> epoch date to say, 2000 - a reasonable kludge.

I think Chris's point is that it would be possible to define, not that
it would be worth implementing.

As for 64-bit times, they already exist on some systems, and I expect
them to be nearly universal long before 2038.

--
Keith Thompson (The_Other_Keith) kst-u@mib.org
San Diego Supercomputer Center <*>
We must do something. This is something. Therefore, we must do this.

Re: How to check file creation date

am 15.02.2006 02:13:07 von Dan Mercer

"Keith Thompson" wrote in message news:ln4q3130mk.fsf@nuthaus.mib.org...
: "Dan Mercer" writes:
: > "Chris F.A. Johnson" wrote in message
: > news:mgkvb3-dlb.ln1@teksavvy.com...
: > > On 2006-02-10, Dan Mercer wrote:
: [...]
: > > > If you can't define what you want, of what good is it?
: > >
: > > Of course you can define it. You have to make a decision which of
: > > various possible definitions you are going to use.
: >
: > And then you have to modify the filesystem to support it, as well
: > as all filesystem utilities, system calls. And to what end.
: > What will it tell you that is worth the effort of making the
: > change? If you could come up with a reasonable definition and some
: > concrete notion of how the creation time would be used, I suppose it
: > could be rolled into the work effort when UNIX times go 64 bit
: > (Thankfully, I should be retired by then). (Unless, of course,
: > the powers that be simply don't decide to roll forward the
: > epoch date to say, 2000 - a reasonable kludge.
:
: I think Chris's point is that it would be possible to define, not that
: it would be worth implementing.
:
: As for 64-bit times, they already exist on some systems, and I expect
: them to be nearly universal long before 2038.

They'd better be. I already ran into my first 2038 bug.

Dan Mercer
:
: --
: Keith Thompson (The_Other_Keith) kst-u@mib.org
: San Diego Supercomputer Center <*>
: We must do something. This is something. Therefore, we must do this.