Does anybody out there know the linux keyboard shortcut for skipping words in a command prompt. e.g.,

$ locate pdf | xargs -i ls -l {} | grep something

I'd like to scroll through the command by word by word rather than the default letter by letter.

link|improve this question
feedback

migrated from serverfault.com Dec 5 '09 at 1:50

This question came from our site for system administrators and desktop support professionals.

2 Answers

In bash you can use CTRL combined with the left and right arrows or ALT combined with F or B.

See keyboard shortcuts, or readline shortcuts.

link|improve this answer
awesome, thanks! – user19074 Dec 4 '09 at 23:17
Great links! Will make sure to file them away somewhere. – andol Dec 4 '09 at 23:26
feedback

In addition to Zoredache's answer, you can find out the full list of keyboard shortcuts currently available for bash by issuing the command:

bind -P

Additionally, if you're more used to vi-style bindings than emacs-style, you can switch with:

set -o vi

and switch back with

set -o emacs
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.