[clug] Moving files between servers
andrew-clug at andrew.net.au
Wed May 18 23:54:54 GMT 2005
I've got a Solaris-based central file collecting menagerie of shell scripts,
which currently uses F-Secure's proprietary SSH (hereon in referred to as
I wouldn't mind replacing this with OpenSSH, except that Shiteful SSH's scp
command has this blasted -u option, which OpenSSH's scp doesn't have, which
means all the scripts don't work properly.
The -u option unlinks the file after it has been transferred.
So I'm trying to come up with a safe alternative to
scp -u remoteserver:/somedir/* .
using either sftp or rsync over SSH or something of that ilk, but the quick
and dirty options I can think of have all these inherent race conditions in
them whereby a file that hasn't been transferred is deleted, or there is no
checking of successful file transfer before remote file deletion.
More information about the linux