Shell tab-completion and other helpful command-line tricks

Steven Vollom stevenvollom at sbcglobal.net
Fri Jan 30 01:53:21 UTC 2009


On Thursday 29 January 2009 4:09:03 pm Jonas Norlander wrote:
> 2009/1/23 Paul Rumelhart <godshatter at yahoo.com>:
> > I hope you find this helpful, and if you know of any cute tab-completion
> > tricks please let us know.  If you use the command-line a lot, you'll
> > find that pressing the tab key becomes instinctive and you'll really
> > miss it when you are in a program that doesn't use it.
> >
> > Paul
>
> One thing i use all the time with bash is the command history and the
> readline shortcuts. So here is some of my most used shortcuts.
> Arrow up or CTRL+P will fetch the previous command from the history.
> Arrow down or CTRL+N will fetch the next command from the history.
> CTRL+R will reverse search history for what ever you enter. Greate for
> fetching that complicated command you wrote some days ago but dont
> remember.
> CTRL+A move to beginning of line.
> CTRL+E move to end of line.
> ALT+F move forward a word.
> ALT+B move back a word.
> CTRL+L clear screen.
> CTRL+k remove the text from the cursor to the end of the line.
> CTRL+X BACKSPACE remove text from the cursor to the beginning of the line.
> ALT+D delete a word forward.
> ALT+BACKSPACE delete a word backwards.
>
> And there is more shortcuts in the readline library like copy and
> paste that could help a lot when working in the shell.
>
> / Jonas

This wasn't directed to me, however, thanks.  I have saved it.  Now I just 
have to memorize and use it.

Steven






More information about the kubuntu-users mailing list