How to do <cmd> file | hold file

Peter da Silva peter at ficc.ferranti.com
Mon Sep 10 07:02:40 AEST 1990


In article <12272:Sep916:37:0290 at kramden.acf.nyu.edu> brnstnd at kramden.acf.nyu.edu (Dan Bernstein) writes:
> No; it preserves the multiple links to the original rather than trashing
> them

Which is what it should do. Let's say the file in question is "/bin/smail"
and the link to it is "/bin/rmail"... do you really want these files to get
out of sync?

We have an editor people use here called "aedit", and it behaves the way
you want "cp" to behave. It's caused more problems than you would believe.
Multiple links to a file should remain under normal operation.. they're
there for a reason.

> Since you can get the write-over behavior with the shell's >, why do you
> need it in cp?

Designing for the common case. You can get the uncommon case by doing
an "rm" first, so why do you need it in cp?
-- 
Peter da Silva.   `-_-'
+1 713 274 5180.   'U`
peter at ferranti.com



More information about the Comp.unix.shell mailing list