span.fullpost {display:inline;}

Wednesday, October 1, 2008

TAB COMPLETION

This has been in The Tips before, but got lost at the end part of another tip: ¨searching¨ . . Just because it´s such a handy feature of the commandline and because many members are struggling to get the commands typed correctly . . . here it is again:
The Tab key autocompletes on the commandline, you type a few characters and press the Tab key and the command or the name of the file will be completed:
Try this, "cd /u" and press tab now add an "s" and press tab, give an "h" and press tab, now we have got "cd /usr/share/" OK lets go on, type a "f" "o" "n" tab "t" tab "d" tab. <> Now we are in /usr/share/fonts/ttf/decoratives. "ls" will give you a list of all the fancy ttf fonts on your system.

So next time you have to type a long command like this:


CODE
# cp synthesis.hdlist.update_source.cz /var/lib/urpmi/synthesis.hdlist.update_source.cz


You type:


CODE
# cp sy ( tab ) ( space ) /v ( tab ) li ( tab) u ( tab ) sy ( tab )



And you will see that the full command is on your screen ( This command works only if the file "synthesis.hdlist.update_source.cz" is in your /home direcotry )


More on the Tab key and commands:

If you don´t remember exactly how a command was written, type in the first character or two and hit the tab, you will get a list of all the commands that start with that character(s).

If you wish to know what a certain command does ( ex: mkmanifest ), type:


CODE
$ whatis mkmanifest


This is what you get back to the screen :


QUOTE (Text @ Screen)
mkmanifest (1) - makes list of file names and their DOS 8+3 equivalent


All Linux commands and their descriptions can be found at O'Reilly

0 comments:

Tutorialsland By - Templates4all | Free Blogger and web Templates
Free Website templatesFree Flash TemplatesFree joomla templatesSEO Web Design AgencyMusic Videos OnlineFree Wordpress Themes Templatesfreethemes4all.comFree Blog TemplatesLast NewsFree CMS TemplatesFree CSS TemplatesSoccer Videos OnlineFree Wordpress ThemesFree Web Templates