Operating System - HP-UX
1833744 Members
2897 Online
110063 Solutions
New Discussion

Re: File Created/Modified Year

 
SOLVED
Go to solution
Shahul
Esteemed Contributor

File Created/Modified Year

Hi All

Can some one tell me how will I see the year of a file created/last modified. ll command will show the year only for the files which are created before six months.

Now my problem is, I have been changing the system time to past and future.. Now I am not able to trace which file created when. If I can see the year field for all files, It is OK for me..

Thanks in advnace
Shahul
4 REPLIES 4
Paula J Frazer-Campbell
Honored Contributor

Re: File Created/Modified Year

Hi

Find should do it

- mtime
- atime
- ctime

See man find.

Paula
If you can spell SysAdmin then you is one - anon
Tom Geudens
Honored Contributor
Solution

Re: File Created/Modified Year

Hi,
Very interesting post (where I did not give the right answer :-) about this :
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x65727d4cf554d611abdb0090277a778c,00.html

Regards,
Tom
A life ? Cool ! Where can I download one of those from ?
A. Clay Stephenson
Acclaimed Contributor

Re: File Created/Modified Year

Now for the bad news, if you know the creation time it's only by accident. ctime really refers to the lasst time the file was changed (e.g. chmod'ed); there is not creation time in UNIX.
If it ain't broke, I can fix that.
Shahul
Esteemed Contributor

Re: File Created/Modified Year


Ya..This works

#echo /home/user/file |cpio -o 2>/dev/null |cpio -ivt 2 >/dev/null

Thanks to all

Shahul