From owner-freebsd-questions Mon Nov 23 04:05:57 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA06579 for freebsd-questions-outgoing; Mon, 23 Nov 1998 04:05:57 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from caladan.tdx.co.uk (caladan.tdx.co.uk [195.188.177.4]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA06449 for ; Mon, 23 Nov 1998 04:05:50 -0800 (PST) (envelope-from kpielorz@tdx.co.uk) Received: from tdx.co.uk (lorca-tx.tdx.co.uk [195.188.177.242]) by caladan.tdx.co.uk (8.9.1/8.9.1) with ESMTP id MAA43056; Mon, 23 Nov 1998 12:05:11 GMT Message-ID: <36594F76.3124EC@tdx.co.uk> Date: Mon, 23 Nov 1998 12:05:10 +0000 From: Karl Pielorz Organization: TDX - The Digital eXchange X-Mailer: Mozilla 4.5 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: Eric Feillant CC: freebsd-questions@FreeBSD.ORG Subject: Re: How compare and test file size ???? URGENT] References: <36594DA2.794BDF32@image-nouvelle.fr> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Eric Feillant wrote: > hi, > > can someone help me about this ==> > > I have a directory named "dir1" with some files and subdir > inside. > > Some users can generate new files or modify files in these > "dir" directory. > > How can i write a script that coud be run every 15 minutes > that test that files has been modified and / or created ? > > i thout that some script shell with awk coud do that for me => > > ls -lR dir1 | awk '{print $5, $9} | while read A B > do ..... something .... > test current file size with old file size ...then ...??? If you want to see if the files are 'the same' look at the MD5 command (man md5) - it generates 'signatures' for files... If the files are the same, the signatures will be the same... Regards, Karl To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message