OT: using pscp to *move* files

Jay R. Ashworth jra at baylink.com
Mon Jul 16 12:18:24 PDT 2007


On Mon, Jul 16, 2007 at 03:11:28PM -0400, Fairlight wrote:
> This public service announcement was brought to you by Jay Ashworth:
> > I'm looking for the lightest-weight way to use pscp/sftp to *move*
> > files from a Linux box to a Windows one.  We tried earlier to use
> > Samba, and for unknown reasons, it didn't want to work properly.
> > 
> > I was hoping to find a switch to pscp that said "after you copy the
> > file, delete it", but it doesn't appear to have such a switch.
> > 
> > Anyone got any ideas?
> 
> The obvious?  If you have control enough to pscp the thing, you must have
> control enough to del the thing.  Subsequent command.
> 
> What am I missing?  I mean, it's not on the same fs, so it's just as good
> as an inter-fs 'mv' since the inode can't be shuffled there.  I'm not
> seeing the drawback to deleting it after you pscp it.  If there's a good
> reason, say so and I'll rethink it.

Non-atomicity: I can't just have teh windows side say "delete
everything" after I've grabbed everything, as I'll end up with a race
condition -- if the Unix side drops a new packet, it will get eaten.

I need the transfer program itself to delete the file, and I need it
not to require scripting -- that is, I need it to support wildcarding
of the Unix end of the link.

Administratively, I can't commit the Windows side to writing
scripting.

So I need either a -d option to pscp (which doesn't appear to exist),
*or* I need to punt and go back to figuring out why Samba stopped
working between these two boxes (at which point I can go back to a
drive letter and ren).

It looks like it will be the latter.

Cheers,
-- jra
-- 
Jay R. Ashworth                   Baylink                      jra at baylink.com
Designer                     The Things I Think                       RFC 2100
Ashworth & Associates     http://baylink.pitas.com                     '87 e24
St Petersburg FL USA      http://photo.imageinc.us             +1 727 647 1274


More information about the Filepro-list mailing list