[lug] cp and rm

David dajo at frii.com
Wed Aug 1 17:04:26 MDT 2001

   Going back to where all this started, I really think RH's move, namely aliasing cp and rm to safer variants, was a fair and good decision. ...

As already stated, personally I like the -i option, and essentially
for the reason you give.  However, that is not the starting point of
this thread; the starting point was the lack of reliability of code
from one release to another.  Also I accept the "good practice"
doctrine that you give.  But that, too, avoids facing the issue of
unreliable code.  In this case I think that I have provided code that
demonstrates that cp does not perform according to its documentation.
That is bad, even if there are a hundred ways around the problem.

To consider the problem, reflect on this code snippet and the result.

type cp
unalias cp
type cp

cp is aliased to `cp -i'
cp is /bin/cp
copying to Archive2
cp: overwrite `/Archive2/home/bozo/.Xdefaults'? 

Are you now so sure about this?  How about POSSIBLY?
   One thing we can PROBABLY count on is that the basic set of /bin programs will always be there, and they always do what we intend.


More information about the LUG mailing list