Subject: Re: Copying a file from one box to another
To: Amir Nazary <anazary@imagepower.com>
From: David Brownlee <abs@anim.dreamworks.com>
List: port-i386
Date: 07/17/1999 12:21:51
	If you can configure the NT box, set it to rename the file after
	copying with a certain extension - and only pickup files with
	that extension.

		David/absolute

     		  -=-  "cold nights, dark days..."  -=-

On Sat, 17 Jul 1999, Amir Nazary wrote:

> Well, it's a samba mounted file transfer from an NT box that is writing a
> tiff file as a fax is received.  The NT box won't allow me to move the file
> until it's finished writing, so that's cool.  But once the file start's
> being moved to the Unix box, I need to be able to move it again through scp
> to another Unix box once I know the file is not still being written to.
> 
> ----- Original Message -----
> From: David Maxwell <david@fundy.ca>
> To: Amir Nazary <anazary@imagepower.com>
> Cc: <port-i386@netbsd.org>
> Sent: Saturday, July 17, 1999 12:08 PM
> Subject: Re: Copying a file from one box to another
> 
> 
> > On Sat, Jul 17, 1999 at 11:51:28AM -0700, Amir Nazary wrote:
> > > How can I be sure that a file that I am scp'ing from one box to another
> is a
> > > completed file (it's still not being written to)  Is there some test
> that
> > > can be done to make sure the file is complete before I scp it (so as not
> to
> > > get half a file)
> >
> > It really depends on your environment... i.e. What was writing to the
> file,
> > and how?
> >
> > If it's a daemon, check to see that the daemon's not running.
> > If the file is kept open while in use, use lsof to see that nothing has it
> open.
> > If it's a daemon and is running, can you rename the file, and kill -HUP
> the
> > daemon to have it start a new file?
> >
> > --
> > David Maxwell, david@vex.net|david@maxwell.net --> Mastery of UNIX, like
> > mastery of language, offers real freedom. The price of freedom is always
> dear,
> > but there's no substitute. Personally, I'd rather pay for my freedom than
> live
> > in a bitmapped, pop-up-happy dungeon like NT. - Thomas Scoville
>