mdu
mdu
The mdu
command in Linux is used to display the amount of disk space occupied by a directory, its subdirectories and files. It is similar to the du
command on Unix.
The mdu
command takes the following arguments:
directory
: The directory to list the disk usage for.options
: Optional arguments that control the behavior of themdu
command.
The following are some of the most common options for the mdu
command:
-h
: Displays sizes in human-readable format.-s
: Displays total size, don't give details for each subdirectory.-t
: Sorts by total size.
For example, the following command lists the disk usage for the directory /home/user
:
The mdu
command is a useful tool for monitoring disk usage. It can be used to identify directories or files that are taking up a lot of space, or to track the growth of disk usage over time.
Here are some additional things to keep in mind about the mdu
command:
The
mdu
command must be run as root or by a user who has permission to view disk usage.The
mdu
command can only be used to list the disk usage for directories that are located on the local machine.The
mdu
command cannot be used to list the disk usage for directories that are located on a remote machine.
It is important to be aware of these limitations when using the mdu
command, so that you do not accidentally list the disk usage for a directory that you do not have permission to view or that is located on a remote machine.
Here are some examples of how to use the mdu
command:
To list the disk usage for the directory
/home/user
in human-readable format:
To list only the total size of the directory
/home/user
and its subdirectories:
To sort the output of the
mdu
command by total size:
I hope this helps! Let me know if you have any other questions.
help
breakdown
Last updated