On 24/07/2026 15:10, Joaquim ESTEVES via GNU coreutils General Discussion wrote:
Hello,
I'd like to request an extra option for the '--interactive' command for rm.
Like many users I have an alias for 'rm' that adds the '-i' flag that should
prohibit me from accidentally deleting important files. The issue is that that
flag is too picky, while the '-I' flag is not informative enough.
Recently I accidentally deleted a lot of files from my home-directory, and I
believe that a more verbose interactive flag, something in between '-I' and
'-I' would be helpful.
Something like:
```
$ rm --interactive=once-verbose .*
rm: remove the following files?
regular file 'foo'
regular file 'bar'
regular file '.bashrc'
...etc
proceed?
```
Is this usefully giving more info though?
There is little point in presenting a huge list of files to users
as that is not practical to parse by someone.
Also if we presented a truncated list, then we might miss presenting
an important file.
If we compare this to the existing '-I' flag, all I would have known about the
files I'm about to delete are how many there are.
```
$ rm --interactive=once .*
rm: remove 22 arguments?
$ # OOPS, deleted an important '.bashrc' file
```
The fact you're removing 22 files should be a huge warning.
I'm not sure how to practically improve things.
Perhaps we could have a --interactive=always-skippable
where you could type 'a' to accept all future removals,
though I'm not sure that helps much either TBH.
cheers,
Padraig