easy one
how can i count the number of directory in a directory
ls -d is not working tell me if anyone of u know thanks |
Try the 'tree' command. You may need to install it first, it is not installed by default on all distros.
It will count directories and files. |
Re: easy one
Quote:
ls -l | grep "^d" |wc -l echo "$((`find -type d -maxdepth 1|wc -l` - 1))" Cheers, Tink |
ls -1d [dirname]/* | wc -l
this won't recurse though... |
Quote:
Cheers, Tink |
Right you are, so it seems. I should have tested it first ;)
|
thanks u people have given me exat answer
|
All times are GMT -5. The time now is 07:01 PM. |