Operating System - HP-UX
1833588 Members
4169 Online
110061 Solutions
New Discussion

Re: creation date of a file

 
SOLVED
Go to solution
jpcast_real
Regular Advisor

creation date of a file

Hello Gurus,

can anyone tell me how can I know the creation date of a file in hp-ux 11i . I have found options in the ll and find which can tell me the ctime of a file . But , where can I get the creation time of the file.

Thanks a lot..
Here rests one who was not what he wanted and didn't want what he was
8 REPLIES 8
Florian Heigl (new acc)
Honored Contributor

Re: creation date of a file

me thinks ctime should be the creation time, mtime is the modification (change...) time.

yesterday I stood at the edge. Today I'm one step ahead.
jpcast_real
Regular Advisor

Re: creation date of a file

This is what the man of the find command says:



-atime n True if the file access time subtracted from
the initialized time is n-1 to n multiples of
24 h. The initialization time shall be a time
between the invocation of the find utility
and the first access by that invocation of
the find utility to any file specified by its
path operands. The access time of
directories in pathname_list is changed by
find itself.

-mtime n True if the file modification time subtracted
from the initialization time is n-1 to n
multiples of 24 h. The initialization time
shall be a time between the invocation of the
find utility and the first access by that
invocation of the find utility to any file
specified in its path operands.

-ctime n True if the time of last change of file
status information subtracted from the
initialization time is n-1 to n multiples of
24 h. The initialization time shall be a time
between the invocation of the find utility
and the first access by that invocation of
the find utility to any file specified by its
Here rests one who was not what he wanted and didn't want what he was
Jean-Luc Oudart
Honored Contributor

Re: creation date of a file

HI

I don't think you can.
you can find last access or last modification

man fstat

also check thread : http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=203044

Regards
Jean-Luc
fiat lux
Robert-Jan Goossens
Honored Contributor

Re: creation date of a file

How do I find the creation time of a file?

You can't - it isn't stored anywhere. Files have a last-modified
time (shown by "ls -l"), a last-accessed time (shown by "ls -lu")
and an inode change time (shown by "ls -lc"). The latter is often
referred to as the "creation time" - even in some man pages -
but that's wrong; it's also set by such operations as mv, ln,
chmod, chown and chgrp.

The man page for "stat(2)" discusses this

Regards,
Robert-Jan
Jean-Luc Oudart
Honored Contributor

Re: creation date of a file

and as per your post

atime => access time
mtime => modification time
ctime => change of status time

Regards
Jean-Luc
fiat lux
jpcast_real
Regular Advisor

Re: creation date of a file

Ok ,thanks .

I just want to know what files are modified when I make an update to an application .

I try to use the :

find . -ctime 1 .

Shouldn't it give me the files modified during the last day???

Regards
Here rests one who was not what he wanted and didn't want what he was
Robert-Jan Goossens
Honored Contributor

Re: creation date of a file

find . -ctime -1

the last 24 hours.
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: creation date of a file

Well, it you want files MODIFIED that is the mtime value; ctime is the CHANGED time. In this case, modified (mtime) means the data itself was changed; ie, the contents of a file. Changed (ctime) means the metadata (owner, group, mode, etc.) related to the file were changed.
If it ain't broke, I can fix that.