$ cd dir
$ ls -d */
it will only list directories present in the current dir and neither files nor contents of subdirs.
It is useful if a dir contains many files and you need to print the list of subdirs only.
$ ls -d */
it will only list directories present in the current dir and neither files nor contents of subdirs.
It is useful if a dir contains many files and you need to print the list of subdirs only.