What will show you all the sub directories of the current directory?
ls
Typing just “ls” will give you a list of all the files and subdirectories in the current directory.
How do I list directories and subdirectories in Windows?
The dir command displays a list of files and subdirectories in a directory. With the /S option, it recurses subdirectories and lists their contents as well. Options listed below may be preset in the DIRCMD environment variable. To override preset options, prefix any switch with – (hyphen), for example, “/-W”.
How to list only the subdirectories in a directory?
Use ls command to list directories only It is always good to do it with the familiar ls command because this is the command you use for displaying the content of a directory. To list only the subdirectories, use the -d option with ls command like this:
How to list only directories in a directory in Linux?
Use ls command to list directories only. List only subdirectories in a specific directory. Use combination of ls and grep command. Use find command to list only directories. Use tree command to list only directories. Using echo command for listing directories. The ls command in Linux is used for listing the contents of any directory.
Is there a command to show only the directories?
As you can see in the output above, it also shows the hidden directory. If your aim is to list only the directories, you may also use the tree command. By default, the tree command gives you the complete directory structure. You can modify it to show only directories and only at the current level.
How to get list of directories in Bash?
The shell is still what is expanding the list of filenames. The shell is the reason to get a list of directories in the PWD. The -d option to ls makes it list the present directory entry instead of the contents of each directory (as presented by default).