Wednesday, February 9, 2011

linux & mysql shell shorcut - good for mobile ssh

Key Sequence

Meaning

Up arrow or Ctrl-P

Recall previous line

Down arrow or Ctrl-N

Recall next line

Left arrow or Ctrl-B

Move cursor left (backward)

Right arrow or Ctrl-F

Move cursor right (forward)

Escape b

Move backward one word

Escape f

Move forward one word

Ctrl-A

Move cursor to beginning of line

Ctrl-E

Move cursor to end of line

Ctrl-D

Delete character under cursor, Ctrl-U Clear the line before cursor position

Delete

Delete character to left of cursor

Escape D

Delete word

Escape Backspace

Delete word to left of cursor

Ctrl-K

Erase everything from cursor to end of line

Ctrl-_

Undo last change; may be repeated

Ctrl + Z
Puts whatever you are running into a suspended background process. fg restores it.
Ctrl + R Let’s you search through previously used commands
Ctrl + U Clears the line before the cursor position. If you are at the end of the line, clears the entire line.
Ctrl + K Clear the line after the cursor

No comments: