Is there any way to list just the folders in a directory using bash commands? ( as the ls command lists all the files and folders )
| ||||
|
feedback
|
|
You can use:
Since all directories end in | ||||
|
feedback
|
|
Stephen Martin's response gave a warning, and listed the current folder as well, so I'd suggest
(This is on Linux; I could not find -maxdepth and -mindepth in the POSIX man page for find) | |||
|
feedback
|
Will list just folders. And as Teddy pointed out you'll need -maxdepth to stop it recusrsing into sub dirs | |||||||
feedback
|