Forrest logo
back to the gdu tool

gdu:tldr:9faf1

gdu: Interactively show the disk usage of the current directory but ignore some sub-directories.
$ gdu --ignore-dirs ${path-to-directory1,path-to-directory2,---}
try on your machine

This command is using the gdu command-line tool with the --ignore-dirs flag to analyze disk usage in one or more directories, while excluding specific directories from the analysis.

  • gdu: This is the command-line tool that stands for "Go Disk Usage". It is used to calculate disk usage in a directory tree and provide output in a human-readable format.

  • --ignore-dirs: This flag tells gdu to exclude specific directories from the analysis. The directories to be ignored are listed after this flag.

  • ${path-to-directory1,path-to-directory2,---}: This is a placeholder indicating that you need to replace it with the actual paths of the directories you want to exclude from the analysis. The paths should be separated by commas.

For example, if you want to analyze disk usage in the /home directory but exclude /home/user1 and /home/user2 directories, the command would look like this:

gdu --ignore-dirs /home/user1,/home/user2 /home

This command will calculate disk usage in the /home directory, excluding /home/user1 and /home/user2, and provide the results in a readable format.

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 gdu tool