[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

listing number of directories only

OK, so one way to list number of files in a directory is:

ls | cat -n

one can list the number of subdirectories by 

du --max-depth=1 | cat -n


find -maxdepth 1 -type d | cat -n

but these two methods list all the hidden directories as well,
.news, .mozilla ...

I tried du --max-depth=1 --exclude '\.*' but it excluded everything
(Guess it treated it as .*).

How can I list only non-hidden subdirectories in a directory?



                                Lance Hoffmeyer

            The propagandist's purpose is to make one set of people
               forget that certain other sets of psople are human
                                 Aldous Huxley

Reply to: