Erase the source file open; specify a tempfile name option
mouring at etoh.eviladmin.org
mouring at etoh.eviladmin.org
Mon May 21 07:11:15 EST 2001
On Sun, 20 May 2001, Jos Backus wrote:
> On Sun, May 20, 2001 at 06:29:03PM +0200, Markus Friedl wrote:
> > On Sun, May 20, 2001 at 01:39:49PM +0200, Gert Doering wrote:
> > > scp file remote:file.tmp
> > > ssh remote mv file.tmp file
> >
> > you can do
> > cat file | ssh remote 'cat - > file.tmp && mv file.tmp file'
> > instead.
>
> This works for one file. What if you want to move multiple files to a remote
> directory and replace those files atomically? Wayne's suggestions would let
> you do that easily.
>
Rsync with --delete-after and -T options.
- Ben
More information about the openssh-unix-dev
mailing list