Auto-completing filenames

The shell if filled with shortcuts and tricks, but there a vital feature you can’t miss at all: the auto-completion (see what says Wikipedia about it). In a few words if you start typing a filename or command an you press [Tab] once it will be automatically completed. If more than a file exist that starts with the characters you typed, double [Tab] prints a list of possibilities.

This is much more than a trick: it’s a safe way to check that you are giving the right parameter to your scripts/programs.

If you mis-type a filename (or directory name) you’ll see the error only executing the command.

cd ~
cd Documanti
-bash: cd: Documanti: No such file or directory
 
cd ~
cd Docu[Tab]
cd Documenti (automatically completed)

 

 

Tagged ,

2 thoughts on “Auto-completing filenames

  1. […] the lab01 directory using the cd command, and check again you did it with pwd. Remember to use the TAB to complete your file names, it saves […]

  2. […] problems you report when using the Bash can be solvedĀ checking the files you are using (use the TAB!) andĀ reading the error […]

Leave a Reply

Your email address will not be published.