How to find large files and directories in Linux?

Today I’m going to give you my tip for finding what’s taking up space on your hard drive without tiring you out too much.

Indeed you must have surely one day had to clean up for lack of space and on Linux it is not necessarily the most practical thing to do when you do not know where to look.

And if you’re like me and don’t like to have headache with geek commands (no offense gentleman/woman) here is a handy little utility.

NCDU (NCurses Disk Usage)

This will allow you to find the largest files and folders without having to use df-h and company.

How to install ncdu on linux?

Very simple, in your terminal type the following line

sudo apt-get install ncdu

How do I find large files and folders on my hard drive?

Once again open your terminal, then go wherever you want and type ncdu
Example :

cd ~ && ncdu

Press enter and this will scan your hard drive.

ncdu is scanning all directories from your start point

Once the scan is done, the files will appear in order of heaviest to least heavy

List of folders and files with ncdu

You can then navigate in the folders with the arrows and the enter key touch.

And here’s how to find what takes up a lot of space on your hard drive when you are on linux.

Easy, right ?

Leave a Reply