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 would either do $ ^ls^rm or $ rm !!:$ or $ rm <alt-.> Pressing <alt-.> repeatedly cycles through the last word in each command in your history. Rob -- In case of atomic attack, the federal ruling against prayer in schools will be temporarily canceled.