[lug] cp and rm
carl wagner
carl.wagner at level3.com
Wed Aug 1 17:33:15 MDT 2001
Overwrite-ing a file has nothing to do with -i. If you want to
overwrite a file you need -f for force if you don't want to be prompted.
Isn't there a setting for noclober? Possibly in the shell?
Carl.
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
More information about the LUG
mailing list