To execute the same command as previously executed five commands ago, you would type:

  • Post author:
  • Post category:Blog
  • Post last modified:May 9, 2024
  • Reading time:1 mins read

To execute the same command as previously executed five commands ago, you would type:

  • @-5
  • &5
  • !-5
  • !5
Explanation & Hint:

To execute the same command as previously executed five commands ago, you would type: !-5

This uses the history expansion feature in many shells like Bash, where !-n refers to the nth command before the current one in the command history.

For more Questions and Answers:

NDG Linux Essentials 2.21 | Command Line Skills Module 5 | Chapter 05 Exam Answers Full 100%