Subject: [mv] overwrite files unexpectedly

From: Hai <[email-masked]>
Date: Thu, 15 Aug 2013 23:16:48 +0800

Hi All

If someone else have issued this thing before, please forgive my 
disturbance.

Command $mv a_file* will overwrite one of your files iff 2 files with 
the same prefix under the folder.

I know we should know what we are doing with the command given by ourselves.
But I think this is an unusual case, and tools should complain it.

Scenario:

$ tree
.
|-- a_file
|-- a_file.c

Having these 2 files under a folder.

And I want to mv these 2 files to another folder with the given 
command('cause I forget to type the destination directory),
so the command will be interpreted to $mv a_file a_file.c, this is a 
totally correct command, so it will be performed perfectly.
but one of my file is overwritten.

Can mv check the args before parsing the data in it? 'Cause I think no 
body is going to rename a file with this kind of command 'mv a_file*',
so there should be a potential error, and should better tell the user.

Regards & Thanks
Hai Guo