Subject: Re: bug#6440: "mv" command's bug

From: Bob Proulx <[email-masked]>
Date: Wed, 16 Jun 2010 14:11:30 -0600

Paolo wrote:
> I think I've found a "mv" command bug (in Ubuntu 10.04's terminal).

Thank you for your bug report.  However we will need more information
from you in order to tell what is happening.  Because I cannot
recreate your problem.

> When I write " mv [directory name] -/[directory name]", it doesn't move
> the first directory, she disappears!

Is that dash character '-' literally there?  If so then that should
produce an error.  Because with a leading dash the string will look
like an option argument and slash '/' is not a valid option argument.
Therefore the characters you are showing us cannot be the command that
is causing you the behavior you are describing to us.  You must be
doing something different from this.

If you can create a repeatable test case so that we can recreate your
problem then that is best.  Regardless we will need to know *exactly*
the command that you used.  For example I tried the following
commands.

  $ mkdir x
  $ cd x
  $ mkdir a b
  $ touch a/foo b/bar
  $ find
  .
  ./b
  ./b/bar
  ./a
  ./a/foo
  $ mv a b
  $ find
  .
  ./b
  ./b/bar
  ./b/a
  ./b/a/foo

That worked completely as expected.  The directory 'a' was moved and
since the target 'b' was also a directory it moved the directory 'a'
into the directory 'b'.

If you could exactly what you are doing and the result that you are
getting when you are experiencing your problem then we could probably
help you with it.

Bob