How to find files in a directory that are larger than certain size?

I have many files under a directory. How to find those files under the directory that are larger than certain size, say 500MB?

asked Mar 5, 2014 by Eric Z Ma (44,280 points)

1 Answer

 
Best answer

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
answered Mar 5, 2014 by Eric Z Ma (44,280 points)
edited Mar 5, 2014 by Eric Z Ma

very good answer. Thank you

commented Oct 16, 2017 by send2gmr (100 points)

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...