Disk Space management tools for Linux Server?

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)
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

John TsioumprisSoftware & Systems EngineerCommented:
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
nociSoftware EngineerCommented:
du -s / | sort         #  (Disk usage, sorted) or
du -sh / | sort -h     # more understandable numbers

Open in new window

and from there select a directory and use that... f.e. for /var
du -s /var | sort            #or
du -sh /var | sort -h

Open in new window

df                                  # freespace

Open in new window

That will show the free space per filesystem (disk).

rm / mv     # user remove or move to get rid of data, move it to another location
cp             # Copy data to another location.    all can work with -r to dive down.

Open in new window

Another thing that should be possible is to setup quota on disks. That would limit the amount of data that is allowed to be used on the filesystem.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
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 DeveloperCommented:
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.