I want to list only the directories in specified path (ls doesn\'t have such option). Also, can this be done with a single line command?
ls
use this to get a list of directory
ls -d */ | sed -e "s/\///g"
du -d1 is perhaps the shortest option. (As long as you don't need to pipe the input to another command.)
du -d1