Search code examples
linuxfilediskspace

Findi All Large Files of specific size on Linux, to clear unwanted space


My linux system is throwing I/O error - disk space full error for any activity. I would like to clear logs, unwanted files with large size.

How to search in file system for files greater than a specific amount?


Solution

  • Use the below command to search for files greater than 200MB in descending order, use sudo to look for files in descending order.


    find / -type f -size +200M -exec ls -lh {} \; 2> /dev/null | awk '{ print $NF ": " $5 }' | sort -nrk 2,2