Wednesday, February 23, 2011

Bash Shell Shortcuts

Bash Shell Shortcuts (Alt - escape in MAC)

Ctrl A - Jump to the begin of line(BOL)
Ctrl E - Jump to the end of line(EOL)

Ctrl B - Move back a char
Ctrl F - Move forward a char

Alt B - Move backward word
Alt F - Move forward word

Alt C - Capitalize the word
Alt L - Make word lowercase
Alt U - Make word uppercase

Alt D - Delete word to right
Ctrl D - Delete char from under the cursor
Alt Backspace - Delete backward from cursor

Ctrl U - Delete from cursor to BOL
Ctrl K - Delete from cursor to EOL

Ctrl C - Terminate the command
Ctrl L - Clear the screen
Ctrl R - Search the history backwards
Ctrl xx - Move between BOL and current cursor position
Ctrl Z - Suspend/ Stop the command

Alt < - Move to the first line in the history
Alt > - Move to the last line in the history

Alt ? - Show current completion list
Alt * - Insert all possible completions
Alt / - Attempt to complete filename
Alt . - Yank last argument to previous command
Alt T - swaps the last two words on curser position and before

Tab twice(TT) - all commands
ls TT - files and directories in current directory
stringTT - starting with string commands
/TT - directory with hidden
*TT - sub dirs without hidden
~TT - users from /etc/passwd
$TT - All Sys variables
@TT - Entries from "/etc/hosts"
=TT - Output like ls or dir

No comments:

Post a Comment