Command to list only directory names under Linux
Sometimes you need to only only list the directory names under Linux, to do this simply use :-
Show Plain TextText code
- ls -d */
Alternative commands you can use are :-
Show Plain TextText code
- find . -type d -exec ls -d {} \;
- ls -d .*"/" *"/"
- find . -type d
Fairly simple stuff but it'll save me remembering next time, with any luck.