Closed Captioning Closed captioning available on our YouTube channel

How to use tabs for autocompletion: 2-Minute Linux Tips

Network World | Feb 21, 2020

In this Linux tip, learn how to use tabs for autocompletion. This practice means that you don’t have to type complete file names or even complete commands – and you’ll probably avoid some typos in the process.

Copyright © 2020 IDG Communications, Inc.

Similar
Hi, this is Sandra Henry-Stocker, author of the “Unix as a Second Language” blog on NetworkWorld.
In this Linux tip, we’re going to look at using tabs for autocompletion. This practice means that you don’t have to type complete file names or even complete commands – and you’ll probably avoid some typos in the process.
To use file completion for commands, simply type the first letters in a command name and then hit the tab key. Here’s a very simple example:
Press tab at this point and the echo command should appear (along with a blank):
At this point for echo, just add the text you want to display.
If more than 1 command begins with the letters you’ve typed, you’ll hear a bell sound and will have to press tab again to see a list of all the commands that start with what you’ve typed. Once you add enough letters to differentiate the command you want from the rest, you will be ready to move forward.
this point, you’ll see “asciiview“ (assuming it’s installed) and can enter the name of the file that you want to view in an ascii format. You can also use file completion for the filename.

That’s your Linux tip for tab completion.
If you have questions or would like to suggest a topic, please add a comment below. And don’t forget to subscribe to the IDG Tech(talk) channel on YouTube.
If you liked this video, please hit the like and share buttons. For more Linux tips, be sure to follow us on Facebook, YouTube and NetworkWorld.com.
Popular
Featured videos from IDG.tv