GNU bug report logs -
#14564
A confusing problem about 'mv'
Previous Next
Reported by: Je Li <jerryli8664 <at> gmail.com>
Date: Thu, 6 Jun 2013 06:57:01 UTC
Severity: normal
Tags: notabug
Done: Pádraig Brady <P <at> draigBrady.com>
Bug is archived. No further changes may be made.
Full log
Message #12 received at control <at> debbugs.gnu.org (full text, mbox):
tag 14564 notabug
close 14564
stop
On 06/06/2013 07:52 AM, Je Li wrote:
> Today I just used a command as below:
>
> $ mv win_* *
>
> and got an unexpected result.
>
> Of course I had some folders named with 'win_*' under current directory,
> such as 'win_core'. After the command is done, I can not find these folders
> anywhere in the file system.
>
> It is a bit confusing, the destination does not seem valid apparently but
> the command is executed without any warnings, and unluckily, my files are
> gone.
>
> My OS: Ubuntu 13.04
Unfortunately coreutils can't do anything here as the shell
is interpreting the command line and just passing the resultant
file list to mv.
Note the last param to mv is generally a single
directory and so '*' would be incorrect,
even if suitably quoted to avoid shell globbing.
thanks,
Pádraig.
This bug report was last modified 11 years and 352 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.