Say I want to delete some ssh-keys of my old company in my .ssh
directory. This is always a pretty delicate undertaking. Still I want to glob for the company name and use rm -rf company* or the likes.
Now before actually executing the command it would be nice if I could get a list of all the targeted files to gloss over, so I would like to glob-expand the pattern to all matching files right away and in the current line before I hit [ENTER]. Is this possbile with bash by default or can I write a script to do so?
(I’m aware that there is the interactive rm -i
option but I would like to see at a glance what’s being targeted)