I would like to list only directories (including hidden) in a given directory (for example /etc/) if I'm not in this directory.
If I want to list all directories, including hidden I use the command:
ls -d */ .*/ I wanted to use this command to list all directories in /etc.
ls /etc I can do this, but I wanted to combine it with the first one, listing only directories.
ls -d */ .*/ /etc or
ls /etc -d */ .*/ don't work. Why?