If your system doesn't have the stat or fstat command, this small program
may do:
#include <sys/stat.h>
main(int argc,char**argv) {
struct stat buf;
char d[256];
stat(argv[1],&buf);
strftime(d, sizeof(d), "%D", localtime(&buf.st_ctime));
printf("%s\n", d);
}
(error checking removed)
Or a perl one-liner:-)
perl -e 'print scalar localtime((stat $ARGV[0])[9]),"\n"' $filename
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 30, 2004 4:13 PM
> To: [EMAIL PROTECTED]
> Subject: [U2] [Unix] creation date/time
>
>
> Hi all,
> I am looking for a unix command that could return the date
> and time that a file was created. Anybody out there now of
> such an animal? Thanks, Scott
> -------
> u2-users mailing list
> [EMAIL PROTECTED]
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/