Subject: Re: Copying a file from one box to another
To: Amir Nazary <anazary@imagepower.com>
From: David Maxwell <david@fundy.ca>
List: port-i386
Date: 07/17/1999 16:08:39
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