I want to list only the directories in specified path (ls
doesn't have such option).
Also, can this be done with a single line command?
Unix – Listing only directories in UNIX
shellunix
Related Topic
- How to mkdir only if a directory does not already exist
- Bash – In the shell, what does ” 2>&1 ” mean
- Bash – How to split a string on a delimiter in Bash
- Bash – How to specify the private SSH-key to use when executing shell command on Git
- Bash – How to set a variable to the output of a command in Bash
- Python – Running shell command and capturing the output
- Linux – Given two directory trees, how can I find out which files differ by content?
Best Answer
Try this
ls -d */
to list directories within the current directory