Erase the source file open; specify a tempfile name option

Jos Backus josb at cncdsl.com
Mon May 21 05:04:01 EST 2001


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.

-- 
Jos Backus                 _/  _/_/_/        "Modularity is not a hack."
                          _/  _/   _/                -- D. J. Bernstein
                         _/  _/_/_/             
                    _/  _/  _/    _/
josb at cncdsl.com     _/_/   _/_/_/            use Std::Disclaimer;



More information about the openssh-unix-dev mailing list