bug-coreutils
[Top][All Lists]
Advanced

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

bug#27864: [request] safety to prevent `rm -rf ~`


From: Assaf Gordon
Subject: bug#27864: [request] safety to prevent `rm -rf ~`
Date: Sun, 28 Oct 2018 21:35:09 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

severity 27864 wishlist
tags 27864 wontfix
close 27864
stop

(triaging old bugs)

On 2017-07-29 10:05 a.m., Pádraig Brady wrote:
On 28/07/17 09:28, R0b0t1 wrote:
I recently had a script create a file named "~" when I passed it a
value for an installation directory. Without thinking the next command
I typed was the one in the title. Luckily this was not my main
computer and was a virtual machine.


On 2017-07-28 11:07 a.m., Bernhard Voelker wrote:
>
> rm(1) does not see the tilde "~", but the shell expands it before
> invoking the tool:


This was one of the reasons that upstream ls defaults to quoting
problematic file names like this. With that you can always
copy and paste the name ('~' in this case), for subsequent use.
Even if not copy/pasting '~' would give a visual indication
that the quoting was needed. If your distro disables that feature,
you can enable it in your ls alias using --quoting='shell-escape'


Given the above, and no further comments in a year,
I'm closing this bug.
Discussion can continue by replying to this thread.

-assaf





reply via email to

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