Thanks all that responsed my questions, this are the best solutions for my
problem
jerry_at_uclink.berkeley.edu Jerry Berkman, UC Berkeley
snkac_at_java.sois.alaska.edu Kurt Carlson University of Alaska
alan_at_nabeth.cxo.dec.com
stevev_at_hexadecimal.uoregon.edu
tpb_at_zk3.dec.com Dr. Thomas P. Blinn, UNIX Software Group
Marcelo Alonso M.
malonsom_at_villacero.com.mx
snkac_at_java.sois.alaska.edu con fecha 10/04/98 04:11:30 PM
Destinatarios: MARCELO ALONSO MONDRAGON/SICARTSA/VILLACERO
CC:
Asunto: Re: Date and Time for Files
>How I get full date and time of file ?
From:
ftp://raven.alaska.edu/pub/sois/README.uals
ftp://raven.alaska.edu/pub/sois/man.uals
kit:
ftp://raven.alaska.edu/pub/sois/uals-v1.7.tar.Z
Example:
snkac_at_java: uals ~/.profile
- 0640 snkac users 1589 980404.1315 /users/sn/snkac/.profile
snkac_at_java: uals -e '%m/%d/%y %H%M%S' ~/.profile
- 0640 snkac users 1589 04/04/98 131526 /users/sn/snkac/.profile
kurt
_____________________________________________________________________
Kurt Carlson University of Alaska, ARSC snkac_at_java.sois.alaska.edu
(907)474-5763 910 Yukon Drive #108.84 Fairbanks, AK 99775-6200
jerry_at_uclink.berkeley.edu con fecha 10/04/98 03:08:37 PM
Destinatarios: MARCELO ALONSO MONDRAGON/SICARTSA/VILLACERO
CC:
Asunto: Re: Date and Time for Files
"ls" gives month, day and time for times in the last six months or so.
Here is a Perl script which gives eacttimes for a file:
#! /usr/local/bin/perl
while ( _at_ARGV ) {
print "\nfile $ARGV[0]\n";
_at_vec = stat( $ARGV[0] );
print "inode=$vec[1], ";
printf "mode=0%o, ", $vec[2] % 512;
print "nlinks=$vec[3], uid=$vec[4], gid=$vec[5], size=$vec[7]\n";
print "atime= "; &print_ts( $vec[8] );
print "mtime= "; &print_ts( $vec[9] );
print "ctime= "; &print_ts( $vec[10] );
sub print_ts {
local( $ts ) = _at__ ;
_at_tv = localtime($ts);
printf "%2.2d:%2.2d:%2.2d ",
$tv[2], $tv[1], $tv[0];
printf "%2.2d %3s 19%2d\n",
$tv[3],
("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")[$
tv[4]], $tv[5];
}
shift;
}
- Jerry Berkman, UC Berkeley
Received on Mon Apr 13 1998 - 17:04:55 NZST