# Inspecting Disk Usage (Ncdu)

To get started with NCDU, load the module using the following command:

```bash
module load ncdu/1.14
```

Once the module has been loaded,  it can be used to easily show the size of all files within a directory:

```bash
ncdu my_directory
```

{% hint style="info" %}
To view options you can use with the `ncdu` command, simply use the command `ncdu --help`
{% endhint %}

The line above uses Ncdu to rank all of the files within the `my_directory` directory. Your window should change to show a loading screen (if the directory doesn't have a lot in it, you may not even see this screen):

![An example loading screen for Ncdu (the full directory for the "Current item" has been obscured)](https://4272811953-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LcWJ6pKCQH6l3rl9IQa%2F-MR1m9CiBb-MO0uOhket%2F-MR1nmx06oMTJ4Eo6McB%2Fimage.png?alt=media\&token=095cca4d-93e4-42ee-b1db-9d46803f766c)

Once Ncdu has finished loading, you will see a result like this:

![A list of files and their sizes as displayed in the output of a call to Ncdu](https://4272811953-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LcWJ6pKCQH6l3rl9IQa%2F-MR1oUceemQkOVHbAtyY%2F-MR1oheha1NZixuafHQC%2Fimage.png?alt=media\&token=834c8693-7bc6-4d37-aab0-c3d849ab20f8)

The files will be ordered with the largest file at the top and the smallest file at the bottom. The bottom left corner shows the `Total disk usage` (which in this case is 25.5 KiB). To quit out of this display, simply press q on your keyboard.

{% hint style="info" %}
If  there is a subdirectory within the directory you're inspecting, the files and directories within that subdirectory can be viewed by selecting the directory with the gray bar (using up and down arrow keys as needed) and then using the right arrow key.
{% endhint %}
