Hello,

        I was wondering if it was generally known that "mv" will delete
a directory if the source and destination are the same.  I noticed this
problem when I was trying to change a directory name from uppercase to
lowercase.

Example:
========

FS0:\> mkdir TEST
FS0:\> dir
Directory of: FS0:\
02/12/2013  12:30 <DIR>               0 efi
03/05/2013  15:58 <DIR>               0 TEST
           0 File(s)
           2 Dir(s)

FS0:\> mv TEST test
Moving FS0:\TEST -> \TEST\TEST
- [ok]

FS0:\> dir
Directory of: FS0:\
02/12/2013  12:30 <DIR>               0 efi
           0 File(s)
           1 Dir(s)
FS0:\>


        I looks like the "mv" command moves the directory to a sub-directory of 
itself and then deletes it.  This effectively kills the directory.  Is 
this how it is supposed to work?  Yikes.  If you try the same thing with 
a file it fails with this error message.

FS0:\> mv test.txt TEST.TXT
Error. The destination is an existant file 'TEST.TXT'.

        It would be nice if the "mv" command was fixed to allow a person
to rename files and directories from lowercase to uppercase, etc. 
However, as it stands now, the "mv" directory command is a very 
dangerous beast.

Thanks,

Stephen




------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to