This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
strange mv behavior: mv <mydir> <mydir>
- From: "linda w \(cyg\)" <cygwin at tlinx dot org>
- To: <cygwin at cygwin dot com>
- Date: Tue, 11 Feb 2003 21:18:05 -0800
- Subject: strange mv behavior: mv <mydir> <mydir>
I stumbled onto this trying to rename a dir from
"Mydir" to "mydir" (w/o capital "M")
> mv Mydir mydir
starts copying "Mydir" into Mydir/mydir.
But it's not just the 'caps' that are the issue since:
> mv mydir mydir
will start copying mydir into itself
On lnx, I get:
mv: cannot move `mydir' to a subdirectory of itself, `mydir/mydir'
Shouldn't I get a similar error on Windows?
Note to do the original, desired mv, I can use:
> mv Mydir foo; mv foo mydir
Which (unfortunately), would be correct windows behavior since
you can't rename a file or dir to a different name that varies only
in capitalization (ignore case "feature").
The problem is 'mv' isn't recognizing that source and target are
the same name (even when case matches), so it is behaving like 'cp'.
linda
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/