How to do <cmd> file | hold file (now cp)

John Macdonald jmm at eci386.uucp
Thu Sep 13 23:51:52 AEST 1990


In article <19911:Sep1113:47:2290 at kramden.acf.nyu.edu> brnstnd at kramden.acf.nyu.edu (Dan Bernstein) writes:
|Let me put it this way: If you had two programs, cp (copy) and rp
|(replace), the first with unlink/create and the second with over-write,
|which would you end up using almost all the time? The only time the
|semantics of rp would be proper would be when you really were replacing
|the old version of a file with a new version---but there's a program
|called ``install'' that was designed to do this job.

I would use replace (spelled cp).  If the file already exists, then I
almost never want to change its ownerships/permissions - they have
already been set correctly, regardless of the ownerships/permissions
of this particular source of replacement data.  There is a program
called "install" on some systems.  There has been a program called cp
that works with the effect that you call replace since the very early
days of Unix.  It might not have had exactly the replace effect in
1973, but probably has ever since.  There have been a number of scripts
written since then...
-- 
Algol 60 was an improvment on most           | John Macdonald
of its successors - C.A.R. Hoare             |   jmm at eci386



More information about the Comp.unix.shell mailing list