GNU bug report logs - #64326
Bug in rm command

Previous Next

Package: coreutils;

Reported by: LitHack <lithack0 <at> gmail.com>

Date: Wed, 28 Jun 2023 14:51:01 UTC

Severity: normal

Tags: notabug

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Arsen Arsenović <arsen <at> aarsen.me>
To: LitHack <lithack0 <at> gmail.com>
Cc: 64326 <at> debbugs.gnu.org
Subject: bug#64326: Some more info about rm bug
Date: Wed, 28 Jun 2023 17:41:13 +0200
[Message part 1 (text/plain, inline)]
Hi,

LitHack <lithack0 <at> 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.
-- 
Arsen Arsenović
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 2 years and 24 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.