I want to re execute the command used nth command ago and last command which name begins with m

41 Views Asked by At

I wanted to ree execute the command I executed nth command ago using the history command but I have no clue how to do it. and also I want to execute the last command I used which name begins with let's say 'm'.

1

There are 1 best solutions below

0
user1934428 On BEST ANSWER

!-2 and !m.

See the chapter HISTORY EXPANSION in the bash man page.