tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: "Gillon, Ian" <Ian.Gillon@TelesensKSCL.com>
Subject: Summary: Compare file dates
Date: Mon, 27 May 2002 14:54:00 +0100	[thread overview]
Message-ID: <073C734BD702D311A0E90001FA7E094704ACD5C6@letterbox.kscl.com> (raw)

Thanks to Peter Gergen, Stan Robinson, Bob Vickers, Harm Ensing, Oisin
McGuiness, alan@nabeth.cxo.cpqcorp.net & Jerome M Berkman for their
suggestions

The solution I went with was the simplest:

file1_date=`ls -al file1_full_path |awk '{print $7" "$6" "$8}'`
file2_date=`ls -al file2_full_path |awk '{print $7" "$6" "$8}'`
if [ $file1_date = $file_date2 ]
then
  echo "file dates are the same"
else
  echo "file dates are not the same"
fi

but I was provided with other solutions in perl & C that uses the stat
system call.

thanks again

> Ian    

-----Original Message-----
From: Gillon, Ian [mailto:Ian.Gillon@TelesensKSCL.com]
Sent: 24/05/2002 09:41
To: Tru64 Unix (E-mail)
Subject: Compare file dates


Hi there, 

Does anyone know how I would compare the date/timestamp of two files to see
whether they matched or not?

thanks in advance

> Ian    
> Ian Gillon
> Technical Services Group
> T e l e s e n s K S C L
> S h a p i n g  t h e  f u t u r e  o f  b i l l i n g 
>  	
> 
> 



**********************************************************************
Legal Disclaimer : This e-mail is for the intended recipient only. 
If an addressing or transmission error has misdirected this e-mail, 
please notify the sender by replying to this e-mail.  If you are not 
the intended recipient you must not use, disclose, distribute, copy,
print or rely on this e-mail.  The opinions expressed in this message
are those of the sender and not those of TelesensKSCL.

This footnote also confirms that this e-mail has been swept by 
MIMEsweeper for the presence of computer viruses.

Please note that TelesensKSCL monitors both incoming and
outgoing emails in accordance with our email policy.
**********************************************************************



                 reply	other threads:[~2002-05-27 13:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox