in reply to Re: A DWIM too far?
in thread A DWIM too far?

"touch temp1 temp2; mv temp2 temp1"? You'll be left with only temp1.

No doubt that is true on your system but on RedHat flavour Linux you will get a prompt before the overwrite:

[root@devel3 root]# touch temp1 temp2; mv temp2 temp1 mv: overwrite `temp1'? n

cheers

tachyon

Replies are listed 'Best First'.
Re^3: A DWIM too far?
by hv (Prior) on Jun 18, 2004 at 00:53 UTC

    I think you'll find that this happens only because RedHat sets up by default an alias (for root only) that rewrites 'mv' to 'mv -i'.

    Hugo

      It is as you say.

      [root@devel3 root]# cat .bashrc [snip] # User specific aliases and functions alias mv='mv -i'

      cheers

      tachyon