How to list directories names but not their contents, in *N*X?
8,886
Solution 1
You can try this command:
ls -d A*/
Solution 2
If you need to do it recursively you could use
find . -type d -name A\*
Related videos on Youtube
Author by
Petruza
General software engineer, golang advocate, also typescript, C, C++, GDScript dev. Interested in emulation, video games, image processing, machine learning, computer vision, natural language processing, web scraping.
Updated on September 18, 2022Comments
-
Petruza over 1 year
If I do a simple
ls
specifying a filename pattern, likels A*
, for directories that match the pattern, it will enter the directory and give the full listing, but how could I get just the listing for./
and only the names of the directories inside, but not their contents? -
grenix over 2 yearssee also superuser.com/a/141989/654930