Subject: Re: How list full creation timestamp for file >6 months old?
From: [email-masked] (Dave Carrigan)
Date: Sun, 30 May 1993 21:15:41 GMT
Newsgroups: comp.unix.questions

In <[email-masked]> [email-masked] (Bruce A. Hamilton) writes:

>This is REALLY basic, but "ls" doesn't do it, if I 
>believe the SunOS 4.1.1 man pages.  How to I list the 
>FULL creation timestamp on a file >6 months old?  (I also
>poked around in the "perl" camel book and didn't find 
>anything.)

How about:

	perl -e 'require "ctime.pl"; print &ctime((stat("filename"))[9])'

Example:
% ls -l rect
-rwxr-xr-x  1 dcarriga    57344 Jun  6  1992 rect*
% perl -e 'require "ctime.pl"; print &ctime((stat("rect"))[9])'
Sat Jun  6 16:59:32 1992
% 

Note that this gives the modification time, not the creation time, which
is what ls(1) gives, at least on SunOS. If you want the modification time,
use [10]; for the access time use [8].
-- 
                                ^
[email-masked]     /|\   Forestry Canada, Northwest Region
Dave Carrigan                  /|\            Northern Forestry Centre
(I speak for myself...          |             ...not for my employer!)