Friday, December 01, 2006

History tricks in Bash

  • ! ! - Last command
  • !n - Get the "n" th command
  • !-n - Get "-n" command from the current command
  • !str - Get the command which matches "str"
  • ^str1^str2 - Replace str1 by str2 for the last command

No comments: