News for hackers. Stuff that matters.
Re:Favorite Unix Commands by codegeek on Monday January 07, 2013 @03:32PM (#5023070)

    alias lsd="ls -ltrF | grep ^d"
Helps me quickly list only directories. Any better alternatives ?
Re:Favorite Unix Commands by gav on Monday January 07, 2013 @03:38PM (#5023105)
Using `find` is nice to get just directories:

$ find . -type d -maxdepth 1

Re:Favorite Unix Commands by pnrao on Monday January 07, 2013 @07:49PM (#5024266)
I use:

% ls -d */

Re:Favorite Unix Commands by VaucGiaps on Monday January 07, 2013 @04:24PM (#5023348)
ls -al | grep ^d
Re:Favorite Unix Commands by ralph on Monday January 07, 2013 @05:50PM (#5023759)
(Fails if a directory has a linefeed in its name followed by a 'd'. :-)
Re:Favorite Unix Commands by lneves on Monday January 07, 2013 @03:43PM (#5023129)

  find . -type d
edit: for the same output as your command you can use:

  dir -l
Re:Favorite Unix Commands by williadc on Monday January 07, 2013 @03:44PM (#5023137)
Dunno what "better" means, but this also works:

find -maxdepth 1 -type d

Re:Favorite Unix Commands by mttsn on Monday January 07, 2013 @03:49PM (#5023159)
seconded. what I have always used
Re:Favorite Unix Commands by jfb on Monday January 07, 2013 @04:40PM (#5023428)
Depends on the shell. In zsh (with EXTENDED_GLOB): *(/) matches only directories.
Re:Favorite Unix Commands by super_mario on Monday January 07, 2013 @07:57PM (#5024292)
I usually

    alias lsd='ls -d */'
Re:Favorite Unix Commands by magoon on Tuesday January 08, 2013 @07:20AM (#5025881)
ls -l | grep drw

I know, it's a bad habit

Re:Favorite Unix Commands by joshbaptiste on Monday January 07, 2013 @10:48PM (#5024772)
echo */ (perfect when your unable to fork)