This is a command-line utility designed to analyze and display directory and file statistics based on their sizes.
- Default Display: Shows first-level directories with their sizes relative to the entire directory's size.
- --filetype [n]: Displays the largest 'n' files sorted by file size within their file types. If 'n' is not specified, it displays all file types.
- --filesize [n]: Displays the largest 'n' files across all directories. If 'n' is not specified, it shows all files sorted by size.
To use SimpleDirStat, navigate to your project directory and run one of the following commands depending on what information you need:
simpledirstat [directory]This will display the size of each first-level directory within the specified directory relative to its total size.
simpledirstat [directory] --filetype [n]This command will list the 'n' largest files sorted by file size within each file type. If 'n' is omitted, all file types are displayed.
simpledirstat [directory] --filesize [n]This displays the 'n' largest files across all directories. If 'n' is not provided, it lists all files sorted by size.
- Clone the repository to your local machine.
- Navigate to the cloned directory.
- Run make to build the project.
- Navigate to the build folder inside the project to find the executable.
To analyze the directory ~/Documents, you can run:
simpledirstat ~/DocumentsTo display file types in the directory ~/Documents:
simpledirstat ~/Documents --filetypeThis project is licensed under the MIT License. See the LICENSE file for details.