Command Line Auto-Complete

I was working with a fellow Linux user today on a project with him (yes, I'm talking about you Eric) and I noticed that when he would 'cd', he would completely type the folder name, even when it was apache-tomcat-6.0.26. This reminded me of a little trick I learned back in college (t'was such a long time ago indeed). I mentioned it to him and after seeing what it did, he exclaimed that he had been looking all over for that and was never able to find it. That, my friends, is why I am detailing it for you here. :)

Note that this little trick works on windows command line as well as linux/unix command line. While the two categories behave slightly differently, it still provides a functionality that is comparable to that of a breath of fresh air in a sewage treatment plant.

For those of you who are impatient, the auto-complete feature of the command line here is *.

How is it used? We'll use linux for this example.

If you type ...

cd /usr/li  &lt;tab&gt;

...the shell will fill in /usr/lib. Now, you will notice that there are two directories in the /usr/ directory that start with lib. If you then proceed to type...

cd /usr/libe  &lt;tab&gt;

...the shell will fill in /usr/libexec.

Neat,  huh?