bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#64326: Some more info about rm bug


From: Bernhard Voelker
Subject: bug#64326: Some more info about rm bug
Date: Wed, 28 Jun 2023 23:02:03 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0

tag 64326 notabug
close 64326
stop

On 6/28/23 19:33, Chris Elvidge wrote:
> On 28/06/2023 16:41, Arsen Arsenović via GNU coreutils Bug Reports wrote:
>> Hi,
>>
>> LitHack <lithack0@gmail.com> writes:
>>
>>> Basically what it doing is that it doesn't recognise (-) this as a file
>>> name part even when using (\-). This bug will work on most of utilities
>>> like cat, cp etc
>>
>> This is simply how argument parsing and shell syntax work.  'rm \-abc'
>> is equivalent to just 'rm -abc', which is parsed as 'rm -a -b -c'.  To
>> delete a file with a dash at the start of its name, use 'rm ./-file' and
>> similar.
>>
>> Hope that helps, have a lovely day.

> Or rm -- -abc
>
> The "double-dash" signals "end of options"

And finally: FAQ #11 - #13:
https://www.gnu.org/software/coreutils/faq/coreutils-faq.html#How-do-I-remove-files-that-start-with-a-dash_003f

I'm hereby closing this issue as not-a-bug.

Have a nice day,
Berny





reply via email to

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