Linux

Find Out Whats Using Disk Space In The Terminal

Posted by Weston Ganger on February 25, 2016

Sometimes Im just looking for a easy way to find out the disk usage of items in a folder or in the whole filesystem

First I will discuss the built-in command for this du, the -h means human readable


# Depth Restricted
du -h -d 3 path/to/folder
# or 
du -h --max-depth 3 path/to/folder

# This one finds only files and folders that are at least 1GB in size, I like to use this for cleaning up hard drives
du -h /path/to/folder | grep '[0-9\.]\+G'

Also there is another really nice command that must be installed first but has an interactive interface. ncdu


# Install using your OS package manager
sudo apt-get install ncdu

# Run the tool
ncdu /path/to/folder

Dont forget to use sudo depending on the folder your using these commands on.


Related External Links:


Posted in Linux and Tagged with find 


Need help on your next project or application?

I specialize in Ruby-on-Rails, AngularJS, Javascript, Bootstrap, and Hybrid Mobile Apps with Cordova & Ionic.

Contact Me

Recommended Posts