Originally Posted by Lordandmaker
As above, really.
Is there an option for ls (or an equivalent) to let me list only the directories? I've had a look at man ls and can't find anything.
In MS-DOS it was DIR /AD.
All i can find on the intarweb is other people asking the same question.
ls|grep '/'|grep -v '^$'>a.txt
ls|grep '/'|grep -v '^$'|cat
spose i should explain mine too
ls (list dah you can whatever you want here)
|grep '/' (i chose / since all directories hidden or not have a / at the end.)
|grep -v '^$' (only displays figures containing /
|cat last one can be cat ( display on screen or > output to text file)