of directories containing 5 or more files:
find . -maxdepth 1 -type d -exec bash -c "echo -ne '{} '; ls '{}' | wc -l" \; | awk '$NF>=5'
How can I find directories containing 5 or more subdirectories, not files?
thank you
use find -type d instead of ls and you should be good
Обсуждают сегодня