Forrest logo
back to the ncdu tool

ncdu:tldr:fcd02

ncdu: Save results to a file.
$ ncdu -o ${filename}
try on your machine

The command ncdu -o ${filename} is used to run the Ncdu (NCurses Disk Usage) program with a specified output file name.

Ncdu is a command-line tool used to analyze disk usage on a filesystem. It provides a visual representation of disk usage in a terminal interface. The tool shows directories and files, sorted by their disk usage, enabling users to identify the largest files and directories that are consuming disk space.

The option -o is used to specify the output file where the results of the disk usage analysis will be saved. The ${filename} is a placeholder that should be replaced with the desired name of the output file. For example, if you want to save the results in a file called "disk_usage.txt", the command would be ncdu -o disk_usage.txt.

After running the command, Ncdu will perform the disk usage analysis and save the results in the specified output file for further reference or analysis.

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