From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Gillon, Ian" Newsgroups: gmane.os.tru64.managers Subject: Summary: Compare file dates Date: Mon, 27 May 2002 14:54:00 +0100 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: <073C734BD702D311A0E90001FA7E094704ACD5C6@letterbox.kscl.com> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Trace: main.gmane.org 1022508022 7478 127.0.0.1 (27 May 2002 14:00:22 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 27 May 2002 14:00:22 +0000 (UTC) Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.20.101]) by main.gmane.org with smtp (Exim 3.33 #1 (Debian)) id 17CL2r-0001wU-00 for ; Mon, 27 May 2002 16:00:22 +0200 Original-Received: (qmail 20958 invoked by uid 5); 27 May 2002 13:54:22 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 20950 invoked from network); 27 May 2002 13:54:22 -0000 Original-Received: from unknown (HELO emroute1.cind.ornl.gov) (134.167.3.119) by 0 with SMTP; 27 May 2002 13:54:22 -0000 Original-Received: from emroute1.cind.ornl.gov (localhost [127.0.0.1]) by emroute1.cind.ornl.gov (PMDF V6.1 #39060) with ESMTP id <0GWR002LRVYLON@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Mon, 27 May 2002 09:54:22 -0400 (EDT) Original-Received: from postcode1.telesenskscl.com (postcode1.telesenskscl.com [195.44.196.26]) by emroute1.cind.ornl.gov (PMDF V6.1 #39060) with ESMTP id <0GWR0085CVY6T7@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Mon, 27 May 2002 09:54:08 -0400 (EDT) Original-Received: from airmail.kscl.com (unverified) by postcode1.telesenskscl.com (Content Technologies SMTPRS 4.2.5) with ESMTP id for ; Mon, 27 May 2002 14:54:36 +0100 Original-Received: by airmail.kscl.com with Internet Mail Service (5.5.2650.21) id <2W8B1CK9>; Mon, 27 May 2002 14:54:01 +0100 Content-return: allowed Original-To: "Tru64 Unix \(E-mail\)" X-Mailer: Internet Mail Service (5.5.2650.21) Xref: main.gmane.org gmane.os.tru64.managers:336 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:336 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. **********************************************************************