> For the complete documentation index, see [llms.txt](https://til.devjugal.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://til.devjugal.com/linux/bash/bash-list-only-directories.md).

# Bash List Only Directories

To only directories of current working directory, we can either use `echo */` or `ls -d */` command.

## 1. Example using `echo` command

```bash
echo */
ansible/ caddy/ cheatsheets/ docker/ git/ github/ go/ learning-resources/ linux/ miscellaneous/ python/ reactjs/ vagrant/ vscode/ wsl/
```

## 2. Example using `ls` command

```bash
ls -d */
ansible/  caddy/  cheatsheets/  docker/  git/  github/  go/  learning-resources/  linux/  miscellaneous/  python/  reactjs/  vagrant/  vscode/  wsl/
```

***Source:*** [***StackOverFlow***](https://stackoverflow.com/a/17009555)
