[KLUG Members] Best command to monitor file size change over time?

Bruce Smith members@kalamazoolinux.org
Wed, 25 Jul 2001 21:21:52 -0400


> > > I am looking for a good Unix command (find?) or Korn shell script
> > Can you be more specific?
> 
> The file would be arriving FTP to a given location at a given time(s) each
> day.  A program is needed that would do the following:
> 
> 1. Wait for the arrival of a file that is expected to come to a given server
> at an approximate  time.
> 
> 2. Monitor the FTP process by testing for increasing file size.  When the
> file stops growing for a safe amount of time (I am just using a minute for a
> "wait" period.  Perhaps this is too long) the file is then available for
> operations.
> 
> > It would be trivial to write a script to write a small shell script
> > to monitor a file to see if the size or contents of a files changes
> > in 60 seconds (assuming you have access to the file).
> >
> Don't bother.  Just wondered if anyone has a similar process to compare and
> save time.

I don't have anything exactly like that, but like I said, it sounds easy.
I'd only take me a minute or two to write something if you like.  It's not
a problem.  If so, I'll need to ask you a couple more questions.

1)  When this script starts, does the file exist (left over from the
    previous day) or is not there (removed when it's done being processed)?

2)  Approximate size of the file?

3)  Is this script running on Linux or some other *nix?

--------------------------------------------
Bruce Smith                bruce@armintl.com
System Administrator / Network Administrator
Armstrong International, Inc.
Three Rivers, Michigan  49093  USA
http://www.armstrong-intl.com/
--------------------------------------------