[lug] cp and rm

David dajo at frii.com
Wed Aug 1 19:00:39 MDT 2001

>>>>> "David" == David  <dajo at frii.com> writes:

   David> To consider the problem, reflect on this code snippet and the result.
   David> type cp
   David> unalias cp
   David> type cp
   David> cp is aliased to `cp -i'
   David> cp is /bin/cp
   David> copying to Archive2
   David> cp: overwrite `/Archive2/home/bozo/.Xdefaults'? 
   I found this interesting, so I looked into it.  I think it is a bash
   bug.  Either that, or it is a weird feature and I don't understand how
   bash works here.

This is the second time that I have raised this issue.  The first time
I submitted a bug report to the bash maintainers who told me that bash
is working properly and that maybe reading the man page for cp would
   The unalias only fails if the sequence above occurs in a shell function.

Yes.  I used the word "sometimes" in an earlier posting.  This, of
course, is a serious part of the problem.  A bug is bad enough, but an
inconsistent bug is the worst.  Ask any automobile mechanic.

   Consider this:
       creche. touch foo bar
       creche. alias cp='cp -i'
       creche. cp foo bar
       cp: overwrite `bar'? y
       creche. unalias cp
       creche. cp foo bar
       creche. alias cp='cp -i'
       creche. doit ()
       > {
       > type cp
       > unalias cp
       > type cp
       > cp foo bar
       > }
       creche. doit
       cp is aliased to `cp -i'
       cp is hashed (/bin/cp)
       cp: overwrite `bar'? y
   This bug is in RH 6.2 (bash 1.14) and RH 7.0 (bash 2.04).
   I don't think this problem has anything to do with Red Hat per se.

FYI, I have this problem in RH 7.1.  As above, I wrote something to
the effect that it may not be a RedHat problem in an earlier posting.
However. regardless of whose "fault" it is, you will be "blamed"
because you are a distributor.  Also, - sorry, but this may hurt - you
will be blamed because RedHat contains other examples of this kind of
inconsistency, and worse.  And that is the answer to this question of
      Do you have some specific piece of Red Hat software you are unhappy
      with?  For particular reasons?

In other words the answer is no.  The fact is that there are too many
poor quality items, and so we users all find a way around the problems
that they generate.  If there were just one or two problems then it
would be easy and worthwhile to submit bug reports.  -- What are you
going to do about this bug now that you know that *something* is
wrong?  (You do not have to tell me/us; but I do think that you should
ask yourself).

See what Ferdinand wrote:
   <snip>                                                            I
   have had problems with backup software, CFD software, ... and the list
   goes on and on.  More consistency (and cooperation with commercial
   software vendors) would help.
   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