> >> Hi. I would like to know if there is a command that will list just > >> directories? > > > > Do a > > > > man ls > > > > There, press / (for searching in the manual). > > > > Type -d (the text to search). > > Type n twice (for next occurence of the searchtext). > > > > See? The option -d is it. > > I don't think this is what is wanted. -d just keeps ls from listing the > conents of the directory when you specify the directory name on the > command line. > > To list just the directories in the current directory you can do > > find . -type d -maxdepth 1 > > or you can feed the output to ls to format it better > > find . -type d -maxdepth 1 | xargs ls -d > > and add other args to ls as needed.
I have alias dir='ls -al | grep ^d | grep -v grep' in my /etc/profile. I like it. :-) Ookhoi