tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* Summary: Compare file dates
@ 2002-05-27 13:54 Gillon, Ian
  0 siblings, 0 replies; only message in thread
From: Gillon, Ian @ 2002-05-27 13:54 UTC (permalink / 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.
**********************************************************************



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-05-27 13:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-27 13:54 Summary: Compare file dates Gillon, Ian

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