Is there a way to count how many files in a specific directory are over some file size? Say, 100 MB?

marked as duplicate by muru, RalfFriedl, Scott, Anthony Geoghegan, Thomas Jul 14 at 11:46

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.



find path/to/directory/ -type f -size +100M -printf 1 | wc -c

Or, if you want to limit the search to the top level directory only (without descending into subdirectories)

find path/to/directory/ -maxdepth 1 -type f -size +100M -printf 1 | wc -c

Not the answer you're looking for? Browse other questions tagged or ask your own question.