Wednesday, July 4, 2007

useful bash shortcuts

ctrl-a: jump to beginning of line
ctrl-e: jump to end of line
alt-f: jump forward a word
alt-b: jump back a word

alt-d: delete word
alt-t transpose two words

ctrl-r: search back for a command, hit ctrl-r again to search back further
ctrl-xx: jump back to your last edit, again to get back to original position

For ctrl and alt commands press control AND the key indicated at the same time. More random bash here:
http://blog.webhosting.uk.com/2007/04/08/using-bash-shell-shortcuts/

4 comments:

Niall Haslam said...

esc -f - thats a usable shortcut.

And what's wrong with home and end for jumping to the start and end?

The word skipping is useful though·

new said...

turns out there are ALTernatives (hahahahaa so funny). Post edited. the ctrl-r searching thing is really useful.

Niall Haslam said...

loving that ctrl-r thing

Andy Watts said...

ctrl-w also deletes backwards one word.