bash - How to list non-empty subdirectories on linux? -
I have a directory that has several subdirectories. I want to list only those subdirectories which contain at least one file, how can I do this?
Find -mandypath 1-MaxPep 1- Type N-Type-D will provide you with all non-direct directories if you want to exclude directories that contain only other directories (but no files), one of the other answers may be better. .
Comments
Post a Comment