Finds all files that are larger than a certain threshold.
require 'find' module Find def match(*paths) matched = [] find(*paths) { |path| matched << path if yield path } return matched end module_function :match end def bigger_than(bytes, *paths) Find.match(*paths) { |p| File.lstat(p).size > bytes } end