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?
```

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
```

Whereas the '-i' flag requires that I press 'y' a few times until I lose
patience, and remove it.

```
$ rm -i .*
rm: remove regular file 'foo'? y
rm: remove regular file 'bar'? ^C
$ rm .* # OOPS, deleted an important '.bashrc' file
```

If contributions are welcome, I'd love to take a crack at implementing it
myself.

Kind regards,
Joaquim Esteves
  • Feature Request: rm -... Joaquim ESTEVES via GNU coreutils General Discussion

Reply via email to