Originally posted by shukla_chanchal
how can i count the number of directory in a directory
ls -d is not working
tell me if anyone of u know
As always in Linux/Unix there's more than one way ...
ls -l | grep "^d" |wc -l
echo "$((`find -type d -maxdepth 1|wc -l` - 1))"