Simple Bash cmd Help
Hello everyone,
Yes, I am a noob and I am trying to display a count of the number of subdirectories in a directory. I have been able to use find -type d to list directories and subdirs but I want a numerical value of dirs and subdirs. I know ls -l gives a count but when I try ls -l -d all it shows is "." I also have tried a combination with the -R option but nothing seems to be working for me. Please forgive my ignorance but I am working on a script for class and this is the first step. Any help will be appreciated. |
Hi,
Are you looking for this: Code:
find . -type d | wc -l |
Thanks for the quick reply druuna. That was exactly what I was looking for.
|
You're welcome :)
|
All times are GMT -5. The time now is 05:50 PM. |