Xref: feenix.metronet.com comp.unix.questions:6151
Newsgroups: comp.unix.questions
Path: feenix.metronet.com!news.ecn.bgu.edu!wupost!math.ohio-state.edu!cyber1.cyberstore.ca!van-bc!vanbc.wimsey.com!cs.ubc.ca!unixg.ubc.ca!kakwa.ucs.ualberta.ca!NoFC.Forestry.CA!dcarriga
From: dcarriga@NoFC.Forestry.CA (Dave Carrigan)
Subject: Re: How list full creation timestamp for file >6 months old?
Message-ID: <C7uz25.Kz5@NoFC.Forestry.CA>
Organization: Northern Forestry Center, Northwest Region, Forestry Canada
References: <1t9a36$9ut@vine.cp10.es.xerox.com>
Date: Sun, 30 May 1993 21:15:41 GMT
Lines: 27

In <1t9a36$9ut@vine.cp10.es.xerox.com> hamilton@cp10.es.xerox.com (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].
-- 
                                ^
dcarrigan@nofc.forestry.ca     /|\   Forestry Canada, Northwest Region
Dave Carrigan                  /|\            Northern Forestry Centre
(I speak for myself...          |             ...not for my employer!)
