Dua, also known as Disk Usage Analyzer, is a command-line tool that helps users conveniently analyze and understand the disk space usage of a specific directory on their computer or server. It provides valuable insights into how the storage is being utilized, allowing users to identify large files or directories that may be taking up significant disk space.
Here are the key features and aspects of Dua:
- Disk space visualization: Dua provides a visual representation of disk space usage through an interactive command-line interface. It displays the directory structure in a hierarchical manner, with each directory and file represented as a block. The size of each block corresponds to the amount of disk space it occupies, giving users a clear overview of storage utilization.
- Sorting and filtering options: Dua allows users to sort the displayed results based on various criteria such as file size, file count, or last modification time. It also provides filtering options to focus on specific file types or exclude certain directories, enabling users to narrow down their analysis and focus on relevant data.
- Summary statistics: Dua presents summary statistics about the disk space usage, including the total size of the analyzed directory, the number of files and directories, and the percentage of disk space occupied by each item. This information helps users quickly assess the overall storage usage and identify areas that may require attention.
- Interactive exploration: Users can navigate through the directory structure in Dua, expanding or collapsing directories to reveal or hide detailed information about subdirectories and files. This interactive exploration allows users to drill down into specific directories to understand their individual disk space usage.
- Configurable output: Dua provides configuration options to customize the output format and level of detail. Users can choose to display sizes in different units (e.g., bytes, kilobytes, megabytes) and control the depth of the directory tree that is shown, depending on the level of granularity needed.
- Command-line efficiency: Dua is designed to be efficient for command-line usage. It is optimized for performance and can handle large directory structures and files without significant slowdowns. This makes it suitable for analyzing disk space usage in various scenarios, including both personal computers and servers.
Dua is a valuable tool for individuals who want to gain insights into disk space usage and manage storage effectively. By using Dua’s visual representation and summary statistics, users can identify areas of their file system that are consuming excessive disk space, enabling them to make informed decisions on cleanup, organization, and storage optimization.
Please note that Dua may have specific command-line options and behavior that can be explored through the tool’s documentation or by using the built-in help command (e.g., “dua –help”).
dua Command Examples
1. Analyze specific directory:
# dua /path/to/directory
2. Display apparent size instead of disk usage:
# dua --apparent-size
3. Count hard-linked files each time they are seen:
# dua --count-hard-links
4. Aggregate the consumed space of one or more directories or files:
# dua aggregate
5. Launch the terminal user interface:
# dua interactive
6. Format printing byte counts:
# dua --format [metric|binary|bytes|GB|GiB|MB|MiB]
7. Set the number of threads to be used:
# dua --threads count