Friday, January 28, 2011

Command Line Shortcuts




I was reading this post today on how to become a command line ninja and here is some interesting stuff I learned:
  • Ctrl+U: This clears the entire line so you can type in a completely new command.
  • Ctrl+K: This deletes the line from the position of the cursor to the end of the line.
  • Ctrl+W: This deletes the word before the cursor only.
  • Ctrl+R: This lets you search your command history for something specific. For example, if you wanted to search for the recent commands that included nano, you would hit Ctrl+R and type nano. It would show your most recent  command, and you could use the up and down arrows to cycle through your history of commands using nano in them.