[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#15105: [mv] overwrite files unexpectedly
From: |
Hai |
Subject: |
bug#15105: [mv] overwrite files unexpectedly |
Date: |
Thu, 15 Aug 2013 23:16:48 +0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
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
- bug#15105: [mv] overwrite files unexpectedly,
Hai <=