Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Say I am in a directory code:

/code
    /very-long-and-descriptive-name

If I want to cd into that directory (or a directory if it comes first in alphabetical order), I can just cd *.

Now say I add more directories and files to code:

/code
    ACKNOWLEDGEMENTS.md
    /a-very-long-directory-name
    /super-long-name-that-is-quite-long
    README.md
    /very-long-and-descriptive-name

Is there a way that I can cd into the (alphabetically ordered) first (a-very), 2nd (super-long) or third (very-long) directory quickly?

Like cd */ 1, cd */ 2, cd */ 3?

share|improve this question
1  
If you use tab key, it should try to auto-complete. So if you type a and tab, it will expand into a-very-long.., s and tab into super-long..., etc. – NuTTyX Aug 11 '14 at 22:06
    
Wow. I did not know that at all and it solves the issue, so if you make that an answer, I would accept it. – Blue Ice Aug 11 '14 at 22:12
up vote 1 down vote accepted

If you use tab key, it should try to auto-complete. So if you type a and tab, it will expand into a-very-long.., s and tab into super-long..., etc

share|improve this answer
    
Thanks... and sorry for the XY problem :) – Blue Ice Aug 11 '14 at 22:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .