[prev in list] [next in list] [prev in thread] [next in thread]
List: bash-bug
Subject: Re: Fwd: Bug: rm -rf /*/*
From: Lawrence_Velázquez <vq () larryv ! me>
Date: 2021-12-01 1:01:24
Message-ID: 73e7affd-57e7-4c95-a217-d44cddd8127f () www ! fastmail ! com
[Download RAW message or body]
On Tue, Nov 30, 2021, at 6:34 PM, Chet Ramey wrote:
> On 11/30/21 3:53 PM, Robert Swinford wrote:
>> (and globbing in zsh evals /*/* to //):
>
> Why? Under what circumstances is that correct?
I assume that OP is incorrectly describing zsh's default behavior
of intercepting risky ''rm'' commands and interactively requesting
confirmation.
$ zsh -f
% rm -rf /*/*
zsh: sure you want to delete all the files in /* [yn]?
This behavior is specific to ''rm'' and can be disabled [*]. In
other contexts, zsh expands ''/*/*'' more or less as usual. This
can be verified trivially.
$ zsh -fc 'print -rC1 -- /*/*'
[*]: https://zsh.sourceforge.io/Doc/Release/Options.html#index-RMSTARSILENT
--
vq
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic