HOW TO FIND THE LARGEST FILES OR DIRECTORIES ON YOUR VPS
October 30, 2015 / by Marco / Categories : Software, Technology
My CentOS VPS was running out of space so I needed to do a bit of a clean up and decided to see which files and directories used up the most space. So after some digging around I found these two commands.
This one is to find the largest 10 directories:
find . -type d -print0 | xargs -0 du | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {}
This one is to find the largest 10 files:
find . -type f -print0 | xargs -0 du | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {}

If you want to display more than 10 results then change the tail -10 to another amount. I then found a couple of large xml files and deleted these which freed up over 2 GB of data.
Our Sponsors
- Advertise Me Pty Ltd
Digital Signage Solutions
OTHER ARTICLES YOU MAY LIKE
STOP NOISY CALLS: THE ANDROID SETTING YOU SHOULD SWITCH ON TODAY
Phone calls still matter. Whether you’re speaking to a client, checking in with family, or handling something urgent on the move, clarity can make or break the conversation. If you’ve ever found yourself apologising for the construction noise behind you, the wind across your microphone, or the café chatter muddling your words, there’s an Android […]
read more
FILMORA 15 – WHAT’S NEW? AI EXTEND, DYNAMIC CAPTIONS, TRUE TIMELINE EDITING + INSTALL GUIDE
There is a particular thrill to installing a major new release of your everyday editor, especially when your workflow is comfortable and productive in the current version. That feeling is right at the heart of the move from Filmora 14 to Filmora 15. This upgrade promises fresh creative features, faster handling of complex projects, and […]
read more


