How to find files in a directory that are larger than certain size?
Posted on In QAI have many files under a directory. How to find those files under the directory that are larger than certain size, say 500MB?
Find the files that are larger than 500MB in the current directory (./
):
find ./ -size +500M
Prints our more information about these files:
find ./ -size +500M -exec ls -lh {} ;
Or, more conveniently, sort these results by file sizes:
(find ./ -size +100M -exec ls -lh {} ;) | sort -rh
very good answer. Thank you
Thanks!
This works for me. “find ./ -size +500M” but in this I want do display with file size of all the outputs “du -sh”