Linux Space Check

From Tech Wiki
Jump to navigation Jump to search

To perform a space check on Linux for the largest directories use the following command replacing /home with the directory of your choice:

du -h /home | grep '[0-9\.]\+G'

To place this in a test file use the following:

echo | du -h /home | grep '[0-9\.]\+G' > spacelist.txt

You can also use the tool ncdu by using the following commands:

yum install ncdu --enablerepo=epel
cd /
ncdu