Not working anymore on Python3 (tried it after rm -rvf ./ *)
I learned a valuable lesson that day about testing recovery from backups before you need them. I also learned a lesson about only running commands in a root shell when you really need to be root.
Oops.
Ctrl+P → Ctrl+A → Alt+D
with `!:1-$`, where 1 is the index of the first argument you want from your previous command.So:
ls [files ...]
rm !:1-$
I personally find it faster to use bash's history expansion. But, we're talking about subsecond differences here. $ ls [files ...]
$ ^ls^rm