August 17, 2023

List directories (folders) with ls

$ ls */ -d

*/ will list the directories - and their content. The option -d tells ls not to list the content of directories.

Telling ls to list contents - and then not to - is counter-productive but I’ve found no elegant way to do so. Let me know if you do.

personal computing command-line interface (cli) gnu linux trisquel shell literacy office applications wiki

No affiliate links, no analytics, no tracking, no cookies. © 2016-2023 Content is licensed under CC BY-NC-SA 4.0 .