Find large files in CentOS, ubuntu and MacOS

Ercan (@flightlesstux)
1 min readSep 16, 2020

Sometimes, maybe everybody needs to check large files in the system. There some useful commands which I’m using often.

Here is the first pattern:

find /home/ercan/ -type f -size +100000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'

If file size more than 250 MB in the system:

sudo find /home/ercan/ -type f -size +250000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'

Here is the results:

/home/ercan/.local/share/Steam/steamapps/common/Counter-Strike: 631M
/home/ercan/.local/share/Steam/steamapps/common/Counter-Strike: 248M
/home/ercan/.local/share/Steam/steamapps/common/Counter-Strike: 251M
/home/ercan/.local/share/Steam/steamapps/common/Counter-Strike: 464M
/home/ercan/.local/share/Steam/steamapps/common/Counter-Strike: 306M
/home/ercan/Downloads/CentOS-7-x86_64-Minimal-2003.iso: 1.1G
/home/ercan/VirtualBox: 13G

--

--

Ercan (@flightlesstux)

⌨️ Solution Architect, formerly DevOps Engineer Lead 👨‍👩‍👧‍👦 3x @AWSCommunity Builder 😶‍🌫️ Certified #AWS Solution Architect (SAA-C03) 🐍 #Python Dev♥️