GNU bug report logs -
#15105
[mv] overwrite files unexpectedly
Previous Next
Reported by: Hai <deliberatekids <at> gmail.com>
Date: Thu, 15 Aug 2013 15:50:02 UTC
Severity: normal
Tags: notabug
Done: Eric Blake <eblake <at> redhat.com>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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
This bug report was last modified 11 years and 284 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.