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

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Ercan (@flightlesstux)
Ercan (@flightlesstux)

Written by Ercan (@flightlesstux)

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

No responses yet

Write a response