Forrest logo
back to the ncdu tool

ncdu:tldr:0b535

ncdu: Analyze a given directory.
$ ncdu ${path-to-directory}
try on your machine

The ncdu command is used to create a disk usage summary of a given directory.

Here's an explanation of the command:

  • ${path-to-directory} represents the path or location of the directory you want to scan. It can be an absolute path like /home/user/documents, or a relative path like ../folder/. The command should be run in the same directory where ncdu is located, or you can provide the absolute path to the ncdu binary itself.

When you execute the ncdu ${path-to-directory} command, ncdu will scan the specified directory and its subdirectories, collecting information about the sizes of files and directories within it. It will display the result in a user-friendly interactive interface, showing the size of each directory and file, as well as the total disk usage for the directory.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the ncdu tool