Ubuntu: How to get bash to display only a partial list of file names when using commands such as ls cp mv



Question:

Let's say I have a lot of files in a directory that take on the following names:

FF_01_1000  FF_01_1001  FF_01_1002  .  .  .  FF_01_9999  FF_02_1000  FF_02_1001  FF_02_1002  .  .  .  FF_02_9999  

Now, if I type a

cp FF  

into the terminal and press tab, it will autocomplete and I will get the following:

cp FF_0  

Now, if I press tab again to see what options I have, bash will show all 19998 filenames. But what if I want to know the options I have up to the first level of ambiguity, or a tab like key that gives me the following output in the terminal only:

FF_01...  FF_02...  

This kind of option is very useful when it comes to navigating filenames that use dates.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »