How to count number of files in a directory that are over a certain file size

6,302

Perhaps

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
Share:
6,302

Related videos on Youtube

Admin
Author by

Admin

Updated on September 18, 2022

Comments