[lug] cp and rm
John Hernandez
John.Hernandez at noaa.gov
Wed Aug 1 17:40:45 MDT 2001
Maybe you've discovered a bug in bash. Or maybe in cp. If you trace down the bug to a particular program, we'll know who to get upset with. Did calling /bin/cp directly fix the problem? If not, perhaps it's not unalias that's failing you, maybe something else is resposible for this. noclobber bash option? Just guessing now...
David wrote:
>
> 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.
>
> dajo
> _______________________________________________
> Web Page: http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
--
- John Hernandez - Network Engineer - 303-497-6392 -
| National Oceanic and Atmospheric Administration |
| Mailstop R/OM12. 325 Broadway, Boulder, CO 80305 |
----------------------------------------------------
More information about the LUG
mailing list