check to see if cp is complete

Peter Dressner pdressne at netxcom.UUCP
Thu May 25 08:43:51 AEST 1989


   We have a problem in that a polling process may open a file
   that is being copied (using cp or rcp) at that moment.

   What is desired is that the file be left alone until
   the cp is complete.

   How can one tell when a cp is complete. There is nothing
   in the inode that says this file is open. You could check
   the creation date and wait until the file is X seconds old
   but that is clumsy and not 100% reliable.

   Does cp and rcp, by convention, lock a file while it is
   being copied?

   If not, does anyone have good ideas as to how to accomplish 
   this.


   Thanks in advance.


   Peter Dressner, NetExpress Communications.



More information about the Comp.unix.questions mailing list