[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

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:

Look at other FAQ in the vicinity.

Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]