It just occurred to me that I didn’t know how to list only directories, so here it is:
How does this work?
- li -d lists only the directory entires, so instead of listing directory and also whats in it, it lists only the directory name
- */ is expended by the shell (bash in my case) into pwd/*/ (and this is why ls by itself just works, because pwd is appended automatically)
- So basically pwd/*/ means match everything with / at the end, which are directories, and -d says do not list whats inside. So all that are left are the directory names