Need a way to count sub-directories and get a total count
Linux - NewbieThis forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I am trying to figure out a way to list and count all directories with subdirectories below it and then give a summary count and extract that to a flatfile to put into excel.
Background:
I copied a number of old DLT tapes to my system. I created a directory for each tape and then dumped the contents of each tape into this directory. Each subdirectory is symbolic of a record. So i basically need a tally count of all the subdirectories so that I can match that number up against my database to ensure that everything copied over.
I tried
find . -type f -print | wc -l
put it just does not give me what I need.
This system does not have internet access and I am remote into it but locked down by a vpn so I cant copy any utilities such as the tree command.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.