GNU Readline: Useful Command Line Navigation Tools

Most varieties of Unix/Linux use GNU Readline which lets you edit commands on the command line, gives you a command-line history, handles tab-completion, and the like.

Many of the basic commands are pretty obvious: you use the left/right arrow keys to move your cursor. Up/down arrow keys scroll through the saved command history.

Some, however, extremely useful, but are a bit more esoteric. Remmeber that C means the 'Control' key, and M means the 'Meta' key, which is usually Option (OS X) or ALT (Windows).

C-a - move to the beginning of the line.
C-e - move to the end of the line
M-b - move back one word (incidentally, C-f is forward a character, but you have arrow keys for that)
M-f - move forward one work
C-] + character - move forward to the next instance of character M-C-] + character - same, but move backwards

Finally, there are some really esoteric commands. Generally, I don't find it that worthwhile to learn these, but Peter Krumins has put together a GNU Readline cheat sheet with all the gory details. He's also got a good article that covers a few of the more advanced concepts.

Discussion

EllisonStaci31, Jul 13, 2010 06:18 AM

When you are in not good state and have got no money to move out from that, you would have to take the <a href=“http://bestfinance-blog.com”>loan</a>. Because it would aid you emphatically. I take college loan every single year and feel good because of that.

buy thesis, Jul 19, 2010 01:11 PM

This is a supreme knowledge related to school. People would like to have such kind of high talent. But they should purchase the thesis papers suggested by some experienced dissertation writing.

term paper, Jul 21, 2010 05:08 AM

That is good that you are doing such smashing article. I guess that this would be good when people get the essay papers and research paper from you.

A level coursework, Aug 7, 2010 10:42 AM

Life seems to be unbelievable thing. Sometimes it is hard and sometimes it is good. Nonetheless, even when you need to write a coursework, you can buy coursework online and enjoy your life!

do my essay, Aug 9, 2010 12:40 PM

You should waste a lot of free time to compose your term papers, nevertheless an experienced buy an essays service can do it more faster. Why perform term papers? Wtiting services will do that for you.

Enter your comment
 
server-tech/gnu-readline-useful-command-line-shortcuts.txt · Last modified: Nov 10, 2008 05:18 PM by dordal
© 2005-10 David Ordal / DO IT, LLC. All Rights Reserved.