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

Leslie Mikesell les at chinet.chi.il.us
Tue Sep 11 14:00:43 AEST 1990


In article <15472:Sep1015:27:3190 at kramden.acf.nyu.edu> brnstnd at kramden.acf.nyu.edu (Dan Bernstein) writes:

>Of course the editor should use write-over, as it's conceptually
>modifying the *same* file. cp is putting a *different* file into the
>name previously used for the original.

Ah, but cp should only replace the *contents of the file*.  The other
semantics associated with a file (i.e the contents of the inode) are
associated with the name, which is not being changed.

A program that associates the same name with a different inode or different
inode attributes might be a useful thing, but it shouldn't be called cp
(at least not in something that claims to be unix).

Les Mikesell
  les at chinet.chi.il.us



More information about the Comp.unix.shell mailing list