[TriLUG] Scheduling file transfers
Tanner Lovelace
clubjuggler at gmail.com
Thu Apr 7 15:22:51 EDT 2005
On Apr 7, 2005 3:18 PM, Mark Freeze <mfreeze at gmail.com> wrote:
> On some small files this process would be almost instanateous. But on
> larger files the download might take a while so I didnt want my script
> getting part of the file and starting the next step before the
> download was complete. In the past instance I processed a file of
> 80,000 records after I had only downloaded about 60,000. Would rsync
> or ncftpget still work in this situation? I am deleteing the files
> after I download. Downloading a second file behind the first sounds
> like a good idea. I'd just have to have the script check that
> condition before continuing. How would I go about checking the file
> size on the remote machine before download to detect things like
> failed transfers, etc... ?
Generally when rsync downloads a file, it doesn't download it to
the actual filename but rather to a temporary name (and on POSIX
systems, a temp name that begins with a "." so you don't see it).
It renames it to the correct name after the file is completely downloaded.
So, your script shouldn't see the file before it's completely downloaded.
Cheers,
Tanner
--
Tanner Lovelace
clubjuggler at gmail dot com
http://wtl.wayfarer.org/
http://www.freeiPods.com/?r=8127171
(fieldless) In fess two roundels in pale, a billet fesswise and an
increscent, all sable.
More information about the TriLUG
mailing list