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

Patrick Mc Govern members@kalamazoolinux.org
Wed, 25 Jul 2001 19:01:39 -0400


On Wednesday 25 July 2001 17:25, you wrote:
> > I am looking for a good Unix command (find?) or Korn shell script
> > that will look for a file at a given time and monitor it for file
> > size stability ( does not grow in size for say 1 minute ), then
> > retrieve that file.
>
> 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.
Pat