Linux/Ubuntu: How to find large files and directories via SSH

Marc Wag­ner

July 14, 2022

1 min read|

Using the ter­mi­nal, you can easi­ly search for files that have a mini­mum size that you defi­ne yours­elf. The fol­lo­wing call sear­ches the enti­re hard disk for files lar­ger than 10MB and dis­plays them with the path in the ter­mi­nal.

find / -size +10M -ls

Alter­na­tively, you can spe­ci­fy a direc­to­ry that you want to search. You only have to spe­ci­fy the path to the direc­to­ry.

find /var/www/vhosts -size +10M -ls

Or you can abbre­via­te the who­le thing with a dot to search the cur­rent direc­to­ry you are in.

find . -size +10M -ls

If you want to find all files that are bet­ween 10MB and 15MB, you can use the fol­lo­wing call:

find / -size +10M -size -15M -ls
88e86fcb816eff22bc917094df2862d8dd5c0e978b333e6dd5f36f808990c261 96

Arti­kel von:

Marc Wag­ner

Hi Marc here. I’m the foun­der of Forge12 Inter­ac­ti­ve and have been pas­sio­na­te about buil­ding web­sites, online stores, appli­ca­ti­ons and SaaS solu­ti­ons for busi­nesses for over 20 years. Befo­re foun­ding the com­pa­ny, I alre­a­dy work­ed in publicly lis­ted com­pa­nies and acqui­red all kinds of know­ledge. Now I want to pass this know­ledge on to my cus­to­mers.

Hast du eine Fra­ge? Hin­ter­lass bit­te einen Kom­men­tar