{"id":13412796,"url":"https://github.com/dundee/gdu","last_synced_at":"2026-04-01T20:33:20.579Z","repository":{"id":38190456,"uuid":"122750502","full_name":"dundee/gdu","owner":"dundee","description":"Fast disk usage analyzer with console interface written in Go","archived":false,"fork":false,"pushed_at":"2026-03-31T08:18:49.000Z","size":3180,"stargazers_count":5490,"open_issues_count":46,"forks_count":197,"subscribers_count":27,"default_branch":"master","last_synced_at":"2026-03-31T10:19:55.018Z","etag":null,"topics":["cli","disk-usage","filesystem","golang","hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dundee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-02-24T15:04:23.000Z","updated_at":"2026-03-31T08:43:55.000Z","dependencies_parsed_at":"2023-10-04T04:28:41.429Z","dependency_job_id":"93ca5068-40ac-46c7-90bd-4cd3bac0c11e","html_url":"https://github.com/dundee/gdu","commit_stats":{"total_commits":677,"total_committers":43,"mean_commits":"15.744186046511627","dds":0.3353028064992615,"last_synced_commit":"eafd6591b70a49ed38373c3a21bb5c22ed62bb9a"},"previous_names":[],"tags_count":97,"template":false,"template_full_name":null,"purl":"pkg:github/dundee/gdu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dundee%2Fgdu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dundee%2Fgdu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dundee%2Fgdu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dundee%2Fgdu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dundee","download_url":"https://codeload.github.com/dundee/gdu/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dundee%2Fgdu/sbom","scorecard":{"id":359722,"data":{"date":"2025-08-11","repo":{"name":"github.com/dundee/gdu","commit":"7d1a28dc10dc2c42fea38fdd892777e37fe3faa0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":6,"checks":[{"name":"Code-Review","score":4,"reason":"Found 8/20 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"8 commit(s) and 5 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Warn: no topLevel permission defined: .github/workflows/docker.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Warn: no topLevel permission defined: .github/workflows/winget.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/dundee/gdu/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/dundee/gdu/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/dundee/gdu/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/dundee/gdu/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docker.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/dundee/gdu/docker.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/dundee/gdu/docker.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/dundee/gdu/docker.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/dundee/gdu/docker.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/dundee/gdu/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/dundee/gdu/test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/dundee/gdu/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/dundee/gdu/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/dundee/gdu/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/dundee/gdu/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:54: update your workflow using https://app.stepsecurity.io/secureworkflow/dundee/gdu/test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/dundee/gdu/test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/winget.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/dundee/gdu/winget.yml/master?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1","Info:   0 out of  11 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   6 third-party GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":8,"reason":"5 out of the last 5 releases have a total of 5 signed artifacts.","details":["Info: signed release artifact: sha256sums.txt.asc: https://github.com/dundee/gdu/releases/tag/v5.31.0","Info: signed release artifact: sha256sums.txt.asc: https://github.com/dundee/gdu/releases/tag/v5.30.1","Info: signed release artifact: sha256sums.txt.asc: https://github.com/dundee/gdu/releases/tag/v5.30.0","Info: signed release artifact: sha256sums.txt.asc: https://github.com/dundee/gdu/releases/tag/v5.29.0","Info: signed release artifact: sha256sums.txt.asc: https://github.com/dundee/gdu/releases/tag/v5.28.0","Warn: release artifact v5.31.0 does not have provenance: https://api.github.com/repos/dundee/gdu/releases/223606755","Warn: release artifact v5.30.1 does not have provenance: https://api.github.com/repos/dundee/gdu/releases/192731729","Warn: release artifact v5.30.0 does not have provenance: https://api.github.com/repos/dundee/gdu/releases/192729200","Warn: release artifact v5.29.0 does not have provenance: https://api.github.com/repos/dundee/gdu/releases/160812649","Warn: release artifact v5.28.0 does not have provenance: https://api.github.com/repos/dundee/gdu/releases/152082774"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/docker.yml:16"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: SAST configuration detected: CodeQL","Info: all commits (22) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2025-3372 / GHSA-6wxm-mpqj-6jpf","Warn: Project is vulnerable to: GO-2024-3333","Warn: Project is vulnerable to: GO-2025-3503 / GHSA-qxp5-gwg8-xv66","Warn: Project is vulnerable to: GO-2025-3595 / GHSA-vvgc-356p-c3xw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T10:30:28.578Z","repository_id":38190456,"created_at":"2025-08-18T10:30:28.578Z","updated_at":"2025-08-18T10:30:28.578Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31291678,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","disk-usage","filesystem","golang","hacktoberfest"],"created_at":"2024-07-30T20:01:29.316Z","updated_at":"2026-04-01T20:33:20.570Z","avatar_url":"https://github.com/dundee.png","language":"Go","readme":"# go DiskUsage()\n\n\u003cimg src=\"./gdu.png\" alt=\"Gdu \" width=\"200\" align=\"right\"\u003e\n\n[![Codecov](https://codecov.io/gh/dundee/gdu/branch/master/graph/badge.svg)](https://codecov.io/gh/dundee/gdu)\n[![Go Report Card](https://goreportcard.com/badge/github.com/dundee/gdu)](https://goreportcard.com/report/github.com/dundee/gdu)\n[![Maintainability](https://api.codeclimate.com/v1/badges/30d793274607f599e658/maintainability)](https://codeclimate.com/github/dundee/gdu/maintainability)\n[![CodeScene Code Health](https://codescene.io/projects/13129/status-badges/code-health)](https://codescene.io/projects/13129)\n\nPretty fast disk usage analyzer written in Go.\n\nGdu is intended primarily for SSD disks where it can fully utilize parallel processing.\nHowever HDDs work as well, but the performance gain is not so huge.\n\n[![asciicast](https://asciinema.org/a/382738.svg)](https://asciinema.org/a/382738)\n\n\u003ca href=\"https://repology.org/project/gdu/versions\"\u003e\n    \u003cimg src=\"https://repology.org/badge/vertical-allrepos/gdu.svg\" alt=\"Packaging status\" align=\"right\"\u003e\n\u003c/a\u003e\n\n## Installation\n\nHead for the [releases page](https://github.com/dundee/gdu/releases) and download the binary for your system.\n\nUsing curl:\n\n    curl -L https://github.com/dundee/gdu/releases/latest/download/gdu_linux_amd64.tgz | tar xz\n    chmod +x gdu_linux_amd64\n    mv gdu_linux_amd64 /usr/bin/gdu\n\nSee the [installation page](./INSTALL.md) for other ways how to install Gdu to your system.\n\nOr you can use Gdu directly via Docker:\n\n    docker run --rm --init --interactive --tty --privileged --volume /:/mnt/root ghcr.io/dundee/gdu /mnt/root\n\n## Usage\n\n```\n  gdu [directory_to_scan] [flags]\n\nFlags:\n      --archive-browsing              Enable browsing of zip/jar/tar archives (tar, tar.gz, tar.bz2, tar.xz)\n      --collapse-path                 Collapse single-child directory chains\n      --config-file string            Read config from file (default is $HOME/.gdu.yaml)\n  -D, --db string                     Store analysis in database (*.sqlite for SQLite, *.badger for BadgerDB)\n      --depth int                     Show directory structure up to specified depth in non-interactive mode (0 means the flag is ignored)\n      --enable-profiling              Enable collection of profiling data and provide it on http://localhost:6060/debug/pprof/\n  -E, --exclude-type strings          File types to exclude (e.g., --exclude-type yaml,json)\n  -L, --follow-symlinks               Follow symlinks for files, i.e. show the size of the file to which symlink points to (symlinks to directories are not followed)\n  -h, --help                          help for gdu\n  -i, --ignore-dirs strings           Paths to ignore (separated by comma). Can be absolute or relative to current directory (default [/proc,/dev,/sys,/run])\n  -I, --ignore-dirs-pattern strings   Path patterns to ignore (separated by comma)\n  -X, --ignore-from string            Read path patterns to ignore from file\n  -f, --input-file string             Import analysis from JSON file\n      --interactive                   Force interactive mode even when output is not a TTY\n  -l, --log-file string               Path to a logfile (default \"/dev/null\")\n      --max-age string                Include files with mtime no older than DURATION (e.g., 7d, 2h30m, 1y2mo)\n  -m, --max-cores int                 Set max cores that Gdu will use. 8 cores available (default 8)\n      --min-age string                Include files with mtime at least DURATION old (e.g., 30d, 1w)\n      --mouse                         Use mouse\n  -c, --no-color                      Do not use colorized output\n  -x, --no-cross                      Do not cross filesystem boundaries\n      --no-delete                     Do not allow deletions\n  -H, --no-hidden                     Ignore hidden directories (beginning with dot)\n      --no-prefix                     Show sizes as raw numbers without any prefixes (SI or binary) in non-interactive mode\n  -p, --no-progress                   Do not show progress in non-interactive mode\n      --no-spawn-shell                Do not allow spawning shell\n  -u, --no-unicode                    Do not use Unicode symbols (for size bar)\n      --no-view-file                  Do not allow viewing file contents\n  -n, --non-interactive               Do not run in interactive mode\n  -o, --output-file string            Export all info into file as JSON\n  -r, --read-from-storage             Use existing database instead of re-scanning\n      --reverse-sort                  Reverse sorting order (smallest to largest) in non-interactive mode\n      --sequential                    Use sequential scanning (intended for rotating HDDs)\n  -A, --show-annexed-size             Use apparent size of git-annex'ed files in case files are not present locally (real usage is zero)\n  -a, --show-apparent-size            Show apparent size\n  -d, --show-disks                    Show all mounted disks\n  -k, --show-in-kib                   Show sizes in KiB (or kB with --si) in non-interactive mode\n  -C, --show-item-count               Show number of items in directory\n  -M, --show-mtime                    Show latest mtime of items in directory\n  -B, --show-relative-size            Show relative size\n      --si                            Show sizes with decimal SI prefixes (kB, MB, GB) instead of binary prefixes (KiB, MiB, GiB)\n      --since string                  Include files with mtime \u003e= WHEN. WHEN accepts RFC3339 timestamp (e.g., 2025-08-11T01:00:00-07:00) or date only YYYY-MM-DD (calendar-day compare; includes the whole day)\n  -s, --summarize                     Show only a total in non-interactive mode\n  -t, --top int                       Show only top X largest files in non-interactive mode\n  -T, --type strings                  File types to include (e.g., --type yaml,json)\n      --until string                  Include files with mtime \u003c= WHEN. WHEN accepts RFC3339 timestamp or date only YYYY-MM-DD\n  -v, --version                       Print version\n      --write-config                  Write current configuration to file (default is $HOME/.gdu.yaml)\n\nBasic list of actions in interactive mode (show help modal for more):\n  ↑ or k                              Move cursor up\n  ↓ or j                              Move cursor down\n  → or Enter or l                     Go to highlighted directory\n  ← or h                              Go to parent directory\n  d                                   Delete the selected file or directory\n  e                                   Empty the selected directory\n  n                                   Sort by name\n  s                                   Sort by size\n  c                                   Show number of items in directory\n  ?                                   Show help modal\n```\n\n## Examples\n\n    gdu                                   # analyze current dir\n    gdu -a                                # show apparent size instead of disk usage\n    gdu --no-delete                       # prevent write operations\n    gdu --no-view-file                    # prevent viewing file contents\n    gdu \u003csome_dir_to_analyze\u003e             # analyze given dir\n    gdu -d                                # show all mounted disks\n    gdu -l ./gdu.log \u003csome_dir\u003e           # write errors to log file\n    gdu -i /sys,/proc /                   # ignore some paths\n    gdu -I '.*[abc]+'                     # ignore paths by regular pattern\n    gdu -X ignore_file /                  # ignore paths by regular patterns from file\n    gdu -c /                              # use only white/gray/black colors\n\n    gdu -n /                              # only print stats, do not start interactive mode\n    gdu --interactive / | tee out.txt     # force interactive mode even when stdout is piped\n    gdu -p /                              # do not show progress, useful when using its output in a script\n    gdu -ps /some/dir                     # show only total usage for given dir\n    gdu -t 10 /                           # show top 10 largest files\n    gdu --reverse-sort -n /               # show files sorted from smallest to largest in non-interactive mode\n    gdu / \u003e file                          # write stats to file, do not start interactive mode\n\n    gdu -o- / | gzip -c \u003ereport.json.gz   # write all info to JSON file for later analysis\n    zcat report.json.gz | gdu -f-         # read analysis from file\n\n    GOGC=10 gdu -g --use-storage /        # use persistent key-value storage for saving analysis data\n    gdu -r /                              # read saved analysis data from persistent key-value storage\n\n## Modes\n\nGdu has three modes: interactive (default), non-interactive and export.\n\nNon-interactive mode is started automatically when TTY is not detected (using [go-isatty](https://github.com/mattn/go-isatty)), for example if the output is being piped to a file, or it can be started explicitly by using a flag. Use `--interactive` to disable this automatic fallback and force interactive mode.\n\nExport mode (flag `-o`) outputs all usage data as JSON, which can be later opened using the `-f` flag.\n\nHard links are counted only once.\n\n## File flags\n\nFiles and directories may be prefixed by a one-character\nflag with following meaning:\n\n* `!` An error occurred while reading this directory.\n\n* `.` An error occurred while reading a subdirectory, size may be not correct.\n\n* `@` File is symlink or socket.\n\n* `H` Same file was already counted (hard link).\n\n* `e` Directory is empty.\n\n## Configuration file\n\nGdu can read (and write) YAML configuration file.\n\n`$HOME/.config/gdu/gdu.yaml` and `$HOME/.gdu.yaml` are checked for the presence of the config file by default.\n\nSee the [full list of all configuration options](configuration.md).\n\n### Examples\n\n* To configure gdu to permanently run in gray-scale color mode:\n\n```\necho \"no-color: true\" \u003e\u003e ~/.gdu.yaml\n```\n\n* To set default sorting in configuration file:\n\n```\nsorting:\n    by: name // size, name, itemCount, mtime\n    order: desc\n```\n\n* To configure gdu to set CWD variable when browsing directories:\n\n```\necho \"change-cwd: true\" \u003e\u003e ~/.gdu.yaml\n```\n\n* To save the current configuration\n\n```\ngdu --write-config\n```\n\n## Styling\n\nThere are wide options for how terminals can be colored.\nSome gdu primitives (like basic text) adapt to different color schemas, but the selected/highlighted row does not.\n\nIf the default look is not sufficient, it can be changed in configuration file, e.g.:\n\n```\nstyle:\n    selected-row:\n        text-color: black\n        background-color: \"#ff0000\"\n```\n\n## Deletion in background and in parallel (experimental)\n\nGdu can delete items in the background, thus not blocking the UI for additional work.\nTo enable:\n\n```\necho \"delete-in-background: true\" \u003e\u003e ~/.gdu.yaml\n```\n\nDirectory items can be also deleted in parallel, which might increase the speed of deletion.\nTo enable:\n\n```\necho \"delete-in-parallel: true\" \u003e\u003e ~/.gdu.yaml\n```\n\n## Saving analysis data to database\n\nGdu can store the analysis data to a database file instead of just memory.\nThis allows you to save and reload analysis results later.\nBoth SQLite and BadgerDB are supported.\n\n```\ngdu --db analysis.sqlite /        # saves analysis data to SQLite database\ngdu --db analysis.badger /        # saves analysis data to BadgerDB\ngdu -r --db analysis.sqlite /     # reads saved data, does not run analysis again\n```\n\n## Running tests\n\n    make install-dev-dependencies\n    make test\n\n## Profiling\n\nGdu can collect profiling data when the `--enable-profiling` flag is set.\nThe data are provided via embedded http server on URL `http://localhost:6060/debug/pprof/`.\n\nYou can then use e.g. `go tool pprof -web http://localhost:6060/debug/pprof/heap`\nto open the heap profile as SVG image in your web browser.\n\n## Benchmarks\n\nBenchmarks were performed on 50G directory (100k directories, 400k files) on 500 GB SSD using [hyperfine](https://github.com/sharkdp/hyperfine).\nSee `benchmark` target in [Makefile](Makefile) for more info.\n\n### Cold cache\n\nFilesystem cache was cleared using `sync; echo 3 | sudo tee /proc/sys/vm/drop_caches`.\n\n| Command | Mean [s] | Min [s] | Max [s] | Relative |\n|:---|---:|---:|---:|---:|\n| `diskus ~` | 3.074 ± 0.010 | 3.056 | 3.094 | 1.00 |\n| `gdu -npc ~` | 3.133 ± 0.013 | 3.116 | 3.159 | 1.02 ± 0.01 |\n| `gdu -gnpc ~` | 3.157 ± 0.013 | 3.139 | 3.180 | 1.03 ± 0.01 |\n| `pdu ~` | 3.772 ± 0.149 | 3.630 | 4.071 | 1.23 ± 0.05 |\n| `dust -d0 ~` | 4.001 ± 0.162 | 3.786 | 4.305 | 1.30 ± 0.05 |\n| `dua ~` | 5.315 ± 3.210 | 4.068 | 14.447 | 1.73 ± 1.04 |\n| `gdu -npc --use-storage ~` | 12.690 ± 0.527 | 11.325 | 13.091 | 4.13 ± 0.17 |\n| `du -hs ~` | 14.940 ± 0.064 | 14.852 | 15.048 | 4.86 ± 0.03 |\n| `duc index ~` | 15.501 ± 0.136 | 15.386 | 15.849 | 5.04 ± 0.05 |\n| `ncdu -0 -o /dev/null ~` | 15.688 ± 0.053 | 15.610 | 15.789 | 5.10 ± 0.02 |\n\n### Warm cache\n\n| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |\n|:---|---:|---:|---:|---:|\n| `diskus ~` | 211.4 ± 3.7 | 206.4 | 219.3 | 1.00 |\n| `pdu ~` | 221.8 ± 2.4 | 219.3 | 226.3 | 1.05 ± 0.02 |\n| `dust -d0 ~` | 363.6 ± 5.4 | 357.3 | 373.2 | 1.72 ± 0.04 |\n| `gdu -npc ~` | 434.3 ± 3.4 | 426.0 | 437.8 | 2.05 ± 0.04 |\n| `dua ~` | 451.2 ± 4.2 | 444.9 | 457.9 | 2.13 ± 0.04 |\n| `gdu -gnpc ~` | 521.0 ± 14.0 | 510.9 | 558.5 | 2.46 ± 0.08 |\n| `du -hs ~` | 809.4 ± 3.2 | 804.8 | 816.0 | 3.83 ± 0.07 |\n| `duc index ~` | 952.3 ± 4.8 | 946.0 | 961.7 | 4.50 ± 0.08 |\n| `ncdu -0 -o /dev/null ~` | 1432.8 ± 3.4 | 1428.0 | 1439.0 | 6.78 ± 0.12 |\n| `gdu -npc --use-storage ~` | 9950.0 ± 474.1 | 9117.5 | 10647.4 | 47.07 ± 2.39 |\n\n## Alternatives\n\n* [ncdu](https://dev.yorhel.nl/ncdu) - NCurses based tool written in pure `C` (LTS) or `zig` (Stable)\n* [godu](https://github.com/viktomas/godu) - Analyzer with a carousel like user interface\n* [dua](https://github.com/Byron/dua-cli) - Tool written in `Rust` with interface similar to gdu (and ncdu)\n* [diskus](https://github.com/sharkdp/diskus) - Very simple but very fast tool written in `Rust`\n* [duc](https://duc.zevv.nl/) - Collection of tools with many possibilities for inspecting and visualising disk usage\n* [dust](https://github.com/bootandy/dust) - Tool written in `Rust` showing tree like structures of disk usage\n* [pdu](https://github.com/KSXGitHub/parallel-disk-usage) - Tool written in `Rust` showing tree like structures of disk usage\n\n## Notes\n\n[HDD icon created by Nikita Golubev - Flaticon](https://www.flaticon.com/free-icons/hdd)\n","funding_links":[],"categories":["Go","File Handling","年度文章盘点","Relational Databases","文件处理","\u003ca name=\"disk-analyzer\"\u003e\u003c/a\u003eDisk usage analyzers","Linux","Other","Table of Contents"],"sub_categories":["Search and Analytic Databases","2021年度文章盘点","检索及分析资料库","Advanced Console UIs"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdundee%2Fgdu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdundee%2Fgdu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdundee%2Fgdu/lists"}