We help IT Professionals succeed at work.

Disk Space management tools for Linux Server?

bleggee asked
Last Modified: 2019-03-07
Can anyone suggest any SW tools/utilities/commands to help manage disk space, identify space hogs, etc for a Linux Server?
(If it matters, it is a web server, headless CentOs 7 LAMP)
Watch Question

John TsioumprisSoftware & Systems Engineer
Distinguished Expert 2019

SInce you are headless you either go for a text based disk usage application like DUtree or if you have webmin then you can go to File Manager.and as you hover over the folder name you will get 3 vertical dots...click on them and in the last entry in the context menu you will see Properties -->Calculate Selected Size
EDIT 1 : Well this was a bit quirky...there is an old module for Webmin called Disk Usage ...install the 1.2 version and you should see it under Others...somehow this should be the END but the module by default only queries the /tmp folder when the issue is to get the whole disk...so if you look carefully you will see a faded cog for settings...hit it and change to / let it calculate/collect and that's all...all the info in a single click
EDIT 2: it's added in the side notification panel and you have a quick overiew or click to have the whole pictureClipboard01.jpg
Software Engineer
Distinguished Expert 2019
This one is on us!
(Get your first solution completely free - no credit card required)
David FavorFractional CTO
Distinguished Expert 2019

I'd add these 2x to noci's list too, which simply add the -h (human option) for faster reading of output.

df -h
df -hi

Open in new window

I also use pyha like this...

# shell startup file
alias lsfs='pydf -ha | grep -P /dev/md | grep -v /var/lib/lxd'

# lsfs
/dev/md4    1804G 1111G  601G 61.6 [####..] /                              
/dev/md4    1804G 1111G  601G 61.6 [####..] /david-favor

Open in new window

Duncan RoeSoftware Developer

I use this script
#set -x
mount >$T
find . -mount -mindepth 1 -maxdepth 1 -type d |
  while read i
    grep -E -q "on $(readlink -f "$i") " $T || du -sx "$i"
  done | sort -n
rm $T

Open in new window

which I have named vss, as below
cat vss.out

Open in new window

The largest directories are at the bottom, so are left on the screen. Run it in /, then in the largest few identified directories. ls -lSr (sort by size) if you don't see big directories in the next level down.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.