On Sun, Apr 22, 2001 at 10:15:40PM -0400, Mark Hurley wrote: > > Anyone know of a method to easily solve this ... > > I *sometimes* list the files before deleting them: > > ls A*.pdf > > Ensuring I have only listed the ones I wish to delete, I then enter: > > rm A*.pdf > > Great, but anyone know of an easier why than the following? > > 1) Type the second command followed by the selected mask? > 2) Go back one in bash "history", [home] to beginning of line replace > "ls" with "rm". > > I'm thinking something like the bash CTRL-R combo? Where you would > type rm (second command) and do a key-combo and fill rest of previous > line in, or to step it further you could keep scrolling back in > history with uparrow-something combo?
Assuming you're running bash, you probably want to use !* : ls A*.pdf rm !* Walt
pgpuAZQ9NmAre.pgp
Description: PGP signature