[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#10819: [BUG][RM]
From: |
Eric Blake |
Subject: |
bug#10819: [BUG][RM] |
Date: |
Wed, 15 Feb 2012 15:06:05 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20120131 Thunderbird/10.0 |
tag 10819 needinfo
thanks
On 02/15/2012 08:05 AM, address@hidden wrote:
> Hello,
>
> I'm writing to you to inform you of a possible bug in the linux "rm"
> command.
> I've experienced that when using by error the said command as following :
> "rm - rf#*"
That's (probably) not a valid command. By putting a space between - and
r, you are asking rm to remove the literal files named "-" and any files
that match the glob "rf#*". Did you mean to type "rm -rf #*" instead,
which says to recursively and without warning remove any files that
match the glob "#*"?
It would help us if your report was actual copy-and-paste contents of
what you really did: ls to list directory contents beforehand, then the
rm call you used, then ls afterwards to show what remains, as well as
how that differs from your expectations.
> if there is no file named #*# (* being the same as in the console,
> anything) in the current directory, rm quits as expected because of the
> incorrect syntax.
> But if there is a file named #*#, rm deletes all the current file's
> content except the said file.
Meanwhile, I'm going to guess that you may be hitting one of our FAQ on
how globbing works, and how to make rm remove what you want it to remove:
https://www.gnu.org/software/coreutils/faq/#Why-doesn_0027t-rm-_002dr-_002a_002epattern-recurse-like-it-should_003f
Look at other FAQ in the vicinity.
--
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- bug#10819: [BUG][RM], address@hidden, 2012/02/15
- bug#10819: [BUG][RM],
Eric Blake <=
- bug#10819: [BUG][RM], Davide Brini, 2012/02/16
- bug#10819: [BUG][RM], Jim Meyering, 2012/02/16
- bug#10819: [BUG][RM], Voelker, Bernhard, 2012/02/16
- bug#10819: [BUG][RM], Jim Meyering, 2012/02/16
- bug#10819: [BUG][RM], Voelker, Bernhard, 2012/02/16
- bug#10819: [BUG][RM], Jim Meyering, 2012/02/16
- bug#10819: [BUG][RM], Voelker, Bernhard, 2012/02/16
- bug#10819: [BUG][RM], Eric Blake, 2012/02/16
- bug#10819: [BUG][RM], Jim Meyering, 2012/02/16
- bug#10819: [BUG][RM], Stefano Lattarini, 2012/02/16