I am trying to define alias for a group of commands counting recursively and displaying the number of all sub-directories encountered for any working directory (including ones with invisible file names). So far what I have done is:
ls -R | wc -l
But it does not display the hidden files number. So I tried this command:
ls -l | grep ^d | wc -l
But I am not sure whether it is the right command or not?