Erase the source file open; specify a tempfile name option

mouring at etoh.eviladmin.org mouring at etoh.eviladmin.org
Mon May 21 07:09:13 EST 2001



On Sun, 20 May 2001, Wayne Davison wrote:

> On Sun, 20 May 2001, Markus Friedl wrote:
> > On Sun, May 20, 2001 at 01:31:43AM -0700, Wayne Davison wrote:
> > > Consider why "mv" exists when we have "cp" and "rm".
> >
> > because
> > 	mv a b
> > does not copy and is very different from
> > 	cp a b; rm a
>
> Yes, I was wrong about the general case, but if the file cannot be
> renamed (i.e. it crosses a file system), mv is idential to your cp/rm
> example, which is what I was thinking of in the scp case.
>

This has been widely regard by a lot of older UNIX Admin as an abuse of
'mv' command.  However, this is rather a new feature (6 years or so).

Yes, the commerical scp2 client has -u.  So one could argument for a
compatibility standpoint that we should have it.   But I have to agree
that rsync is the tool you want instead of scp.  It supports both '-T,
--temp-dir=DIR' and '--delete-after'.

- Ben




More information about the openssh-unix-dev mailing list