0

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'.

user1934428
  • 19,864
  • 7
  • 42
  • 87
totalNoob
  • 17
  • 5

1 Answers1

2

!-2 and !m.

See the chapter HISTORY EXPANSION in the bash man page.

user1934428
  • 19,864
  • 7
  • 42
  • 87