Saturday, June 12, 2010

view only dir in console (linux)

$ cd dir
$ ls -d */

it will only list directories present in the current dir and neither files nor contents of subdirs.
It is useful if a dir contains many files and you need to print the list of subdirs only.