{"id":13478019,"url":"https://github.com/solidiquis/erdtree","last_synced_at":"2025-04-09T13:02:37.808Z","repository":{"id":40449491,"uuid":"488850453","full_name":"solidiquis/erdtree","owner":"solidiquis","description":"A modern, cross-platform, multi-threaded, and general purpose filesystem and disk-usage utility that is aware of .gitignore and hidden file rules.","archived":false,"fork":false,"pushed_at":"2024-05-19T18:05:33.000Z","size":19038,"stargazers_count":2381,"open_issues_count":30,"forks_count":64,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-10-29T15:27:24.169Z","etag":null,"topics":["cli","command","command-line","command-line-tool","du","dua","dust","exa","fd","find","ls","rust","tree","wc"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/erdtree","language":"Rust","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/solidiquis.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":"https://www.buymeacoffee.com/O3nsHqb7A9"}},"created_at":"2022-05-05T06:03:04.000Z","updated_at":"2024-10-24T12:27:26.000Z","dependencies_parsed_at":"2023-11-07T19:35:58.895Z","dependency_job_id":"991c78c5-3b50-4252-a289-ae1fa10c3664","html_url":"https://github.com/solidiquis/erdtree","commit_stats":{"total_commits":290,"total_committers":13,"mean_commits":"22.307692307692307","dds":"0.34827586206896555","last_synced_commit":"ccc078e9abb0050c511f4d9c7118a62b7073572b"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidiquis%2Ferdtree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidiquis%2Ferdtree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidiquis%2Ferdtree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidiquis%2Ferdtree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solidiquis","download_url":"https://codeload.github.com/solidiquis/erdtree/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248045230,"owners_count":21038553,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","command","command-line","command-line-tool","du","dua","dust","exa","fd","find","ls","rust","tree","wc"],"created_at":"2024-07-31T16:01:51.362Z","updated_at":"2025-04-09T13:02:37.788Z","avatar_url":"https://github.com/solidiquis.png","language":"Rust","readme":"# erdtree (erd)\n\n[![Build status](https://github.com/solidiquis/erdtree/actions/workflows/ci.yml/badge.svg)](https://github.com/solidiquis/erdtree/actions)\n[![Crates.io](https://img.shields.io/crates/v/erdtree.svg)](https://crates.io/crates/erdtree)\n[![Packaging status](https://repology.org/badge/tiny-repos/erdtree.svg)](https://repology.org/project/erdtree/versions)\n[![Crates.io](https://img.shields.io/crates/d/erdtree)](https://crates.io/crates/erdtree)\n\n`erdtree` is a modern, cross-platform, multi-threaded, and general purpose filesystem and disk-usage utility that is aware of `.gitignore` and hidden file rules.\nThe following are some feature highlights:\n* Reports disk usage using a variety of metrics: bytes (logical or physical), blocks (Unix-only), word-count, or line-count.\n* Supports an `ls -l`-like view with information about owners, group, file permission, etc. (Unix-only).\n* Respects hidden file and gitignore rules by default.\n* Supports regular expressions and glob based searching by file-type.\n* Comes with several layouts: a reverse tree output, a `tree`-like output, or a `du`-like output.\n* Granular sorting capabilities.\n* Supports icons.\n* Colorized with `LS_COLORS`.\n\nYou can think of `erdtree` as a little bit of `du`, `tree`, `find`, `wc` and `ls`.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/solidiquis/erdtree/blob/master/assets/top_showcase.png?raw=true\" alt=\"failed to load picture\" /\u003e\n\u003c/p\u003e\n\n## Table of Contents\n\n* [Usage](#usage)\n* [Installation](#installation)\n* [Documentation](#documentation)\n  - [Configuration file](#configuration-file)\n      - [Toml file](#toml-file)\n      - [.erdtreerc](#erdtreerc)\n  - [Hardlinks](#hardlinks)\n  - [Symlinks](#symlinks)\n  - [Disk usage](#disk-usage)\n      - [Physical vs logical](#physical-vs-logical)\n      - [Matching `du` output](#matching-du-output)\n      - [Word and line count](#word-and-line-count)\n  - [Layouts](#layouts)\n  - [gitignore](#gitignore)\n  - [Hidden files](#hidden-files)\n  - [Icons](#icons)\n  - [Maximum depth](#maximum-depth)\n  - [Pruning empty directories](#pruning-empty-directories)\n  - [Sorting](#sorting)\n  - [Directories only](#directories-only)\n  - [Long view](#long-view)\n  - [Regular expressions and globbing](#regular-expressions-and-globbing)\n  - [Truncating output](#truncating-output)\n  - [Redirecting output and colorization](#redirecting-output-and-colorization)\n  - [Parallelism](#parallelism)\n  - [Completions](#completions)\n  - [Same filesystem](#same-filesystem)\n* [Comparisons against similar programs](#comparisons-against-similar-programs)\n  - [exa](#exa)\n  - [dua](#dua)\n  - [dust](#dust)\n  - [fd](#fd)\n* [Rules for contributing](#rules-for-contributing)\n* [Security policy](#security-policy)\n* [Questions you might have](#questions-you-might-have)\n\n## Usage\n\n```\n$ erd --help\nerdtree (erd) is a cross-platform, multi-threaded, and general purpose filesystem and disk usage utility.\n\nUsage: erd [OPTIONS] [DIR]\n\nArguments:\n  [DIR]\n          Directory to traverse; defaults to current working directory\n\nOptions:\n  -c, --config \u003cCONFIG\u003e\n          Use configuration of named table rather than the top-level table in .erdtree.toml\n\n  -C, --color \u003cCOLOR\u003e\n          Mode of coloring output\n          \n          [default: auto]\n\n          Possible values:\n          - none:  Print plainly without ANSI escapes\n          - auto:  Attempt to colorize output\n          - force: Turn on colorization always\n\n  -d, --disk-usage \u003cDISK_USAGE\u003e\n          Print physical or logical file size\n          \n          [default: physical]\n\n          Possible values:\n          - logical:\n            How many bytes does a file contain\n          - physical:\n            How many actual bytes on disk, taking into account blocks, sparse files, and compression\n          - line:\n            How many total lines a file contains\n          - word:\n            How many total words a file contains\n          - block:\n            How many blocks are allocated to store the file\n\n  -f, --follow\n          Follow symlinks\n\n  -H, --human\n          Print disk usage in human-readable format\n\n  -i, --no-ignore\n          Do not respect .gitignore files\n\n  -I, --icons\n          Display file icons\n\n  -l, --long\n          Show extended metadata and attributes\n\n      --group\n          Show file's groups\n\n      --ino\n          Show each file's ino\n\n      --nlink\n          Show the total number of hardlinks to the underlying inode\n\n      --octal\n          Show permissions in numeric octal format instead of symbolic\n\n      --time \u003cTIME\u003e\n          Which kind of timestamp to use; modified by default\n\n          Possible values:\n          - create: Time created (alias: ctime)\n          - access: Time last accessed (alias: atime)\n          - mod:    Time last modified (alias: mtime)\n\n      --time-format \u003cTIME_FORMAT\u003e\n          Which format to use for the timestamp; default by default\n\n          Possible values:\n          - iso:\n            Timestamp formatted following the iso8601, with slight differences and the time-zone omitted\n          - iso-strict:\n            Timestamp formatted following the exact iso8601 specifications\n          - short:\n            Timestamp only shows date without time in YYYY-MM-DD format\n          - default:\n            Timestamp is shown in DD MMM HH:MM format\n\n  -L, --level \u003cNUM\u003e\n          Maximum depth to display\n\n  -p, --pattern \u003cPATTERN\u003e\n          Regular expression (or glob if '--glob' or '--iglob' is used) used to match files\n\n      --glob\n          Enables glob based searching\n\n      --iglob\n          Enables case-insensitive glob based searching\n\n  -t, --file-type \u003cFILE_TYPE\u003e\n          Restrict regex or glob search to a particular file-type\n\n          Possible values:\n          - file: A regular file\n          - dir:  A directory\n          - link: A symlink\n\n  -P, --prune\n          Remove empty directories from output\n\n  -s, --sort \u003cSORT\u003e\n          How to sort entries\n          \n          [default: size]\n\n          Possible values:\n          - name:    Sort entries by file name in lexicographical order\n          - rname:   Sort entries by file name in reversed lexicographical order\n          - size:    Sort entries by size smallest to largest, top to bottom\n          - rsize:   Sort entries by size largest to smallest, bottom to top\n          - access:  Sort entries by newer to older Accessing Date\n          - raccess: Sort entries by older to newer Accessing Date\n          - create:  Sort entries by newer to older Creation Date\n          - rcreate: Sort entries by older to newer Creation Date\n          - mod:     Sort entries by newer to older Alteration Date\n          - rmod:    Sort entries by older to newer Alteration Date\n\n      --dir-order \u003cDIR_ORDER\u003e\n          Sort directories before or after all other file types\n          \n          [default: none]\n\n          Possible values:\n          - none:  Directories are ordered as if they were regular nodes\n          - first: Sort directories above files\n          - last:  Sort directories below files\n\n  -T, --threads \u003cTHREADS\u003e\n          Number of threads to use\n          \n          [default: 10]\n\n  -u, --unit \u003cUNIT\u003e\n          Report disk usage in binary or SI units\n          \n          [default: bin]\n\n          Possible values:\n          - bin: Displays disk usage using binary prefixes\n          - si:  Displays disk usage using SI prefixes\n\n  -x, --one-file-system\n          Prevent traversal into directories that are on different filesystems\n\n  -y, --layout \u003cLAYOUT\u003e\n          Which kind of layout to use when rendering the output\n          \n          [default: regular]\n\n          Possible values:\n          - regular:  Outputs the tree with the root node at the bottom of the output\n          - inverted: Outputs the tree with the root node at the top of the output\n          - flat:     Outputs a flat layout using paths rather than an ASCII tree\n          - iflat:    Outputs an inverted flat layout with the root at the top of the output\n\n  -., --hidden\n          Show hidden files\n\n      --no-git\n          Disable traversal of .git directory when traversing hidden files\n\n      --completions \u003cCOMPLETIONS\u003e\n          Print completions for a given shell to stdout\n          \n          [possible values: bash, elvish, fish, powershell, zsh]\n\n      --dirs-only\n          Only print directories\n\n      --no-config\n          Don't read configuration file\n\n      --no-progress\n          Hides the progress indicator\n\n      --suppress-size\n          Omit disk usage from output\n\n      --truncate\n          Truncate output to fit terminal emulator window\n\n  -h, --help\n          Print help (see a summary with '-h')\n\n  -V, --version\n          Print version\n```\n\n`-l, --long` and all of its arguments are currently not available on Windows, but support for a Windows variant is planned.\n\n## Installation\n\n### crates.io (non-Windows)\n\nMake sure you have [Rust and its toolchain](https://www.rust-lang.org/tools/install) installed.\n\n```\n$ cargo install erdtree\n```\n\n### crates.io (Windows)\n\nThe Windows version relies on some experimental features in order to properly support hard-link detection. If you want to build from `crates.io` you'll first need to install the nightly toolchain before installing `erdtree`:\n\n```\n$ rustup toolchain install nightly-2023-06-11\n```\n\nThereafter:\n\n```\n$ cargo +nightly-2023-06-11 install erdtree\n```\n\n### Homebrew-core\n\n```\n$ brew install erdtree\n```\n\n### Scoop\n\n```\n$ scoop install erdtree\n```\n\n### NetBSD\n\n```\n$ pkgin install erdtree\n```\n\n### Releases\n\nBinaries for common architectures can be downloaded from latest releases.\n\n### Latest non-release\n\nIf you'd like the latest features that are on `master` but aren't yet included as part of a release:\n\n```\n$ cargo install --git https://github.com/solidiquis/erdtree --branch master\n```\n\nOther means of installation to come.\n\n## Documentation\n\n### Configuration file\n\nIf `erdtree`'s out-of-the-box defaults don't meet your specific requirements, you can set your own defaults using a configuration file.\n\nThe configuration file currently comes in two flavors: `.erdtreerc` (to be deprecated) and `.erdtree.toml`. If you have both,\n`.erdtreerc` will take precedent and `.erdtree.toml` will be disregarded, but please **note that `.erdtreerc` will be deprecated in the near future.** There is\nno reason to have both.\n\n#### TOML file\n\n`erdtree` will look for `.erdtree.toml` in any of the following locations:\n\nOn Unix-systems:\n\n```\n$ERDTREE_TOML_PATH\n$XDG_CONFIG_HOME/erdtree/.erdtree.toml\n$XDG_CONFIG_HOME/.erdtree.toml\n$HOME/.config/erdtree/.erdtree.toml\n$HOME/.erdtree.toml\n```\n\nOn Windows:\n\n```\n%APPDATA%\\erdtree\\.erdtree.toml\n```\n\n[Here](example/.erdtree.toml) and below is an example of a valid `.erdtree.toml`:\n\n```toml\nicons = true\nhuman = true\n\n# Compute file sizes like `du`\n# e.g. `erd --config du`\n[du]\ndisk_usage = \"block\"\nicons = true\nlayout = \"flat\"\nno-ignore = true\nno-git = true\nhidden = true\nlevel = 1\n\n# Do as `ls -l`\n# e.g. `erd --config ls`\n[ls]\nicons = true\nhuman = true\nlevel = 1\nsuppress-size = true\nlong = true\n\n# How many lines of Rust are in this code base?\n# e.g. `erd --config rs`\n[rs]\ndisk-usage = \"line\"\nlevel = 1\npattern = \"\\\\.rs$\"\n```\n\n`.erdtree.toml` supports multiple configurations. The top-level table is the main config that will be applied without additional arguments.\nIf you wish to use a separate configuration, create a named table like `du` above, set your arguments, and invoke it like so:\n\n```\n$ erd --config du\n\n# equivalent to\n\n$ erd --disk-usage block --icons --layout flat --no-ignore --no-git --hidden --level 1\n```\n\nAs far as the arguments go there are only three rules you need to be aware of:\n1. `.erdtree.toml` only accepts long-named arguments without the preceding \"--\".\n2. Types are enforced, so numbers are expected to be numbers, booleans are expected to be booleans, strings are expected to be strings, and so on and so forth.\n3. `snake_case` and `kebap-case` works.\n\n#### .erdtreerc\n\n`erdtree` will look for a configuration file in any of the following locations:\n\nOn Linux/Mac/Unix-like:\n- `$ERDTREE_CONFIG_PATH`\n- `$XDG_CONFIG_HOME/erdtree/.erdtreerc`\n- `$XDG_CONFIG_HOME/.erdtreerc`\n- `$HOME/.config/erdtree/.erdtreerc`\n- `$HOME/.erdtreerc`\n\nOn Windows:\n- `$ERDTREE_CONFIG_PATH`\n- `%APPDATA%\\erdtree\\.erdtreerc`\n\nThe format of a config file is as follows:\n- Every line is an `erdtree` option/argument.\n- Lines starting with `#` are considered comments and are thus ignored.\n\nArguments passed to `erdtree` on the command-line will override those found in `.erdtreerc`.\n\n[Click here](example/.erdtreerc) for an example `.erdtreerc`.\n\n**If you have a config that you would like to ignore without deleting you can use `--no-config`.**\n\n### Hardlinks\n\nIf multiple hardlinks that point to the same inode are in the same file-tree, all will be included in the output but only one is considered when computing overall disk usage.\n\n### Symlinks\n\n```\n-f, --follow\n      Follow symlinks\n```\n\nSymlinks when followed will have their targets (and descendants) counted towards total disk usage, otherwise the size of the symlink itself will be reported.\nIf a symlink's target happens to be in the same file-tree as the symlink itself, the target and its descendants will not be double-counted towards the total disk-usage.\nWhen a symlink to a directory is followed all of the box-drawing characters of its descendants will be painted in a different color for better visual feedback:\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/solidiquis/erdtree/blob/master/assets/symfollow.png?raw=true\" alt=\"failed to load picture\" /\u003e\n\u003c/p\u003e\n\n### Disk usage\n\nBy default disk usage is reported as the total amount of physical bytes stored on the disk. To get the human-readable form:\n\n```\n-H, --human\n      Print disk usage in human-readable format\n```\n\nWhen using the human-readable form, binary units (e.g. `1 KiB = 1024 B`) are reported by default. If you prefer SI units (`1 KB = 1000 B`) you can use the following:\n\n```\n-u, --unit \u003cUNIT\u003e\n      Report disk usage in binary or SI units\n      \n      [default: bin]\n\n      Possible values:\n      - bin: Displays disk usage using binary prefixes\n      - si:  Displays disk usage using SI prefixes\n```\n\nAdditionally, various other disk usage metrics may be used instead of physical bytes. You have the following metrics available:\n\n```\n-d, --disk-usage \u003cDISK_USAGE\u003e\n      Print physical or logical file size\n      \n      [default: physical]\n\n      Possible values:\n      - logical:\n        How many bytes does a file contain\n      - physical:\n        How many actual bytes on disk, taking into account blocks, sparse files, and compression\n      - line:\n        How many total lines a file contains\n      - word:\n        How many total words a file contains\n      - block:\n        How many blocks are allocated to store the file\n```\n\nLastly, if you'd like to omit disk usage from the output:\n\n```\n--suppress-size\n  Omit disk usage from output\n```\n\n#### Physical vs logical\n\nPhysical size takes into account compression, sparse files, and actual blocks allocated to a particular file.\nLogical size just reports the total number of bytes in a file.\n\n#### Matching `du` output\n\nIf you want the same exact disk usage reporting as `du`, you can do the following:\n\n```\n$ erd --layout flat --disk-usage block --no-ignore --hidden --level\n```\n\nor in short-hand\n\n```\n$ erd -y flat -d block -i -.\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/solidiquis/erdtree/blob/master/assets/du_match.png?raw=true\" alt=\"failed to load png\" /\u003e\n\u003c/p\u003e\n\n#### Word and line count\n\nWhen opting to report disk usage in either word and line count, unlike `wc`, `erdtree` will make no attempt to count the amount of words or lines for files that cannot\nbe encoded as a UTF-8 string such as a JPEG file. For cases such as these the line or total word-count will just appear as empty.\n\nAdditionally, the word and line-count of directories are the summation of all of the line/word-counts of its descendents.\n\n### Layouts\n\n`erdtree` comes with four layouts:\n\n```\n-y, --layout \u003cLAYOUT\u003e\n      Which kind of layout to use when rendering the output\n      \n      [default: regular]\n\n      Possible values:\n      - regular:  Outputs the tree with the root node at the bottom of the output\n      - inverted: Outputs the tree with the root node at the top of the output\n      - flat:     Outputs a flat layout using paths rather than an ASCII tree\n      - iflat:    Outputs an inverted flat layout with the root at the top of the output\n```\n\n* The `inverted` layout a more traditional `tree`-like layout where the root node is at the very top of the output.\n* The `regular` layout is a tree with the root node at the bottom of the output for quick information about total disk usage.\n* The `flat` layout is a tree-less output that more closely resembles `du`.\n\n### gitignore\n\n```\n-i, --no-ignore\n      Do not respect .gitignore files\n```\n\n`.gitignore` is respected by default but can be disregarded with the above argument. `.gitignore` rules are also respected on a per directory basis, so\nevery directory that is encountered during traversal that has a `.gitignore` will also be considered.\n\nIf `.gitignore` is respected any file that is ignored will not be included in the total disk usage.\n\n### Hidden files\n\n```\n-., --hidden\n      Show hidden files\n\n  --no-git\n      Disable traversal of .git directory when traversing hidden files\n```\n\nHidden files ignored by default but can be included with `-., --hidden`. If opting in to show hidden files `.git` is included; to exclude\nit use `--no-git`.\n\nIf hidden files are ignored it will not be included in the total disk usage.\n\n### Icons\n\n```\n-I, --icons                      Display file icons\n```\n\nIcons are an opt-in feature because for icons to render properly it is required that the font you have hooked up to your terminal emulator contains the glyphs necessary to properly render icons.\n\nIf your icons look something like this:\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/solidiquis/erdtree/blob/master/assets/broken_icons.png?raw=true\" alt=\"failed to load png\" /\u003e\n\u003c/p\u003e\n\nthis means that the font you are using doesn't include the relevant glyphs. To resolve this issue download a [NerdFont](https://www.nerdfonts.com/) and hook it up to your terminal emulator.\n\n### Maximum depth\n\nDirectories are fully traversed by default. To limit the maximum depth:\n\n```\n-L, --level \u003cNUM\u003e\n      Maximum depth to display\n```\n\nLimiting the maximum depth to display will not affect the total disk usage report nor the file count report.\n\n### Pruning empty directories\n\nSometimes empty directories may appear in the output. To remove them:\n\n```\n-P, --prune\n      Remove empty directories from output\n```\n\n### Sorting\n\nVarious sorting methods are provided:\n\n```\n-s, --sort \u003cSORT\u003e\n      How to sort entries\n      \n      [default: size]\n\n      Possible values:\n      - name:    Sort entries by file name in lexicographical order\n      - rname:   Sort entries by file name in reversed lexicographical order\n      - size:    Sort entries by size smallest to largest, top to bottom\n      - rsize:   Sort entries by size largest to smallest, bottom to top\n      - access:  Sort entries by newer to older Accessing Date\n      - raccess: Sort entries by older to newer Accessing Date\n      - create:  Sort entries by newer to older Creation Date\n      - rcreate: Sort entries by older to newer Creation Date\n      - mod:     Sort entries by newer to older Alteration Date\n      - rmod:    Sort entries by older to newer Alteration Date\n\n  --dir-order \u003cDIR_ORDER\u003e\n      Sort directories before or after all other file types\n      \n      [default: none]\n\n      Possible values:\n      - none:  Directories are ordered as if they were regular nodes\n      - first: Sort directories above files\n      - last:  Sort directories below files\n```\n\n`--dir-order` and `--sort` acan be used independently of each other.\n\n### Directories only\n\nYou output only directories with:\n\n```\n--dirs-only\n  Only print directories\n```\n\nThis will not affect total disk usage.\n\n### Long view\n\nCurrently only available on Unix-like platforms. Support for Windows is planned.\n\n`erdtree` supports an `ls -l` like long-view:\n\n```\n-l, --long\n  Show extended metadata and attributes\n\n    --group\n      Show file's groups\n\n    --ino\n      Show each file's ino\n\n    --nlink\n      Show the total number of hardlinks to the underlying inode\n\n    --octal\n      Show permissions in numeric octal format instead of symbolic\n\n  --time \u003cTIME\u003e\n      Which kind of timestamp to use; modified by default\n\n      Possible values:\n      - create: Time created (alias: ctime)\n      - access: Time last accessed (alias: atime)\n      - mod:    Time last modified (alias: mtime)\n\n    --time-format \u003cTIME_FORMAT\u003e\n      Which format to use for the timestamp; default by default\n\n      Possible values:\n      - iso:\n        Timestamp formatted following the iso8601, with slight differences and the time-zone omitted\n      - iso-strict:\n        Timestamp formatted following the exact iso8601 specifications\n      - short:\n        Timestamp only shows date without time in YYYY-MM-DD format\n      - default:\n        Timestamp is shown in DD MMM HH:MM format\n```\n\nBy default the columns shown in the order of left to right are:\n  * [permissions](https://en.wikipedia.org/wiki/File-system_permissions#Notation_of_traditional_Unix_permissions) in symbolic notation\n  * The file owner\n  * The date the file was last modified (or created or last accessed)\n\n### Regular expressions and globbing\n\nFiltering for particular files using a regular expression or glob is supported using the following:\n\n```\n-p, --pattern \u003cPATTERN\u003e\n      Regular expression (or glob if '--glob' or '--iglob' is used) used to match files\n\n  --glob\n      Enables glob based searching\n\n  --iglob\n      Enables case-insensitive glob based searching\n\n-t, --file-type \u003cFILE_TYPE\u003e\n      Restrict regex or glob search to a particular file-type\n\n      Possible values:\n      - file: A regular file\n      - dir:  A directory\n      - link: A symlink\n```\n\nIf `--file-type` is not provided when filtering, regular files (`file`) is the default.\n\nAdditionally, **any file that is filtered out will be excluded from the total disk usage**.\n\nLastly, when applying a regular expression or glob to directories, all of its descendents regardless of file-type will be included in the output.\nIf you wish to only show directories you may use `--dirs-only`.\n\nReferences:\n  * [Globbing rules](https://git-scm.com/docs/gitignore#_pattern_format)\n  * [Regular expressions](https://docs.rs/regex/latest/regex/#syntax)\n\n### Truncating output\n\nIn instances where the output does not fit the terminal emulator's window, the output itself may be rendered incoherently:\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/solidiquis/erdtree/blob/master/assets/untrunc.png?raw=true\" alt=\"failed to load picture\" /\u003e\n\u003c/p\u003e\n\nIn these situations the following may be used:\n\n```\n--truncate\n  Truncate output to fit terminal emulator window\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/solidiquis/erdtree/blob/master/assets/trunc.png?raw=true\" alt=\"failed to load picture\" /\u003e\n\u003c/p\u003e\n\n### Redirecting output and colorization\n\nBy default colorization of the output is enabled if stdout is found to be a tty. If the output is not a tty such in the case of redirection to a file or piping to\nanother command then colorization is disabled.\n\nIf, however, the default behavior doesn't suit your needs you have control over the modes of colorization:\n\n```\n-C, --color \u003cCOLOR\u003e\n      Mode of coloring output\n      \n      [default: auto]\n\n      Possible values:\n      - none:  Print plainly without ANSI escapes\n      - auto:  Attempt to colorize output\n      - force: Turn on colorization always\n```\n\n`erdtree` also supports [NO_COLOR](https://no-color.org/).\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/solidiquis/erdtree/blob/master/assets/colorization.png?raw=true\" alt=\"failed to load picture\" /\u003e\n\u003c/p\u003e\n\n### Parallelism\n\nThe amount of threads used by `erdtree` can be adjusted with the following:\n\n```\n-T, --threads \u003cTHREADS\u003e          Number of threads to use [default: 3]\n```\n\n#### Why parallelism\n\nA common question that gets asked is how parallelism benefits disk reads when filesystem I/O is processed serially.\n\nWhile this is true, parallelism still results in improved throughput due to the fact that disks have a [queue depth](https://en.wikipedia.org/wiki/IOPS)\nthat, when saturated, allows requests to be processed in aggregate keeping the disk busy as opposed to having it wait on `erdtree` to do CPU-bound processing\nin between requests. Additionally these threads aren't just parallelizing disk reads, they're also parallelizing the processing of the retrieved data.\n\nIt should be noted however that performance, as a function of thread-count, is asymptotic in nature (see [Amdahl's Law](https://en.wikipedia.org/wiki/Amdahl%27s_law))\nso you'll quickly reach a point of dimishing returns after a certain thread-count threshold as you'd be paying the cost of managing a larger threadpool with no added benefit.\n\nFor empirical data on the subject checkout [this article](https://pkolaczk.github.io/disk-parallelism/).\n\n### Completions\n\n`--completions` is used to generate auto-completions for common shells so that the `tab` key can attempt to complete your command or give you hints; where you place the output highly depends on your shell as well as your setup. In my environment where I use `zshell` with `oh-my-zsh`, I would install completions like so:\n\n```\n$ erd --completions zsh \u003e ~/.oh-my-zsh/completions/_erd\n$ source ~/.zshrc\n```\n\n### Same filesystem\n\nIf you are traversing a directory that contains mount points to other filesystems that you do not wish to traverse, use the following:\n\n```\n-x, --one-file-system\n      Prevent traversal into directories that are on different filesystems\n```\n\n## Rules for contributing\n\nFor rules on how to contribute please refer to [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## Security policy\n\nFor information regarding `erdtree`'s security policy and how to report a security vulnerability please refer to [SECURITY_POLICY.md](SECURITY.md)\n\n## Comparisons against similar programs\n\nIt goes without saying that the following programs are all amazing in their own right and were highly influential in `erdtree`'s development. While each of the following are highly\nspecialized in acting as modern replacements for their Unix progenitors, `erdtree` aims to take bits and pieces of each that people use most frequently and assemble them into a unified highly practical tool.\n\nNo case will be made as to why `erdtree` should be preferred over X, Y, or Z, but because of some notable similarities with the following programs it is worth a brief\ncomparison.\n\n### [exa](https://github.com/ogham/exa)\n\n`exa` and `erdtree` are similar in that they both have tree-views and show information about permissions, owners, groups, etc..\n\nThe disadvantage of `exa`, however, is that it [does not provide information about the disk usages of directories](https://github.com/ogham/exa/issues/91), which\nalso makes sorting files by size a little dubious. The advantage `exa` has over `erdtree`, however, is in the fact that `exa` is much more comprehensive as an `ls` replacement.\n\nBoth tools are complimentary to one another and it is encouraged that you have both in your toolkit.\n\n### [dua](https://github.com/Byron/dua-cli)\n\n`dua` is a fantastic interactive disk usage tool that serves as a modern alternative to\n[ncdu](https://en.wikipedia.org/wiki/Ncdu). If you're in the mood for something interactive and solely focused on disk usage then `dua` might suit you more.\nIf you're interested in file permissions and doing quick static analysis of your disk usage without spinning up an entire interactive UI then perhaps consider `erdtree`.\n\n### [dust](https://github.com/bootandy/dust)\n\n`dust` is another fantastic tool that is closer in geneology to the traditional `du` command. If you're strictly looking for\na modern replacement to `du` then `dust` is a great choice.\n\n### [fd](https://github.com/sharkdp/fd)\n\n`fd` is much more comprehensive as a general finder tool, offering itself as a modern replacement to `find`. If you're looking for more granularity in your ability to search beyond just globbing, regular\nexpressions, and the three basic file types (files, directories, and symlinks) then `fd` is the optimal choice.\n\n## Questions you might have\n\n_Q: Why did you make this? It's totally unnecessary._\n\nA: Ennui.\n\n_Q: Why is it called erdtree?_\n\nA: It's a reference to an object of worship in Elden Ring.\n\n_Q: Is it any good?_\n\nA: Yes.\n\n_Q: Why is there no mention of this project being blazingly fast or written in Rust? Is it slow or something?_\n\nA: Okay fine. `erdtree` is written in Rust and is blazingly fast.\n\n\u003cimg src=\"https://i.redd.it/t7ns9qtb5gh81.jpg\"\u003e\n","funding_links":["https://www.buymeacoffee.com/O3nsHqb7A9"],"categories":["Rust","cli","\u003ca name=\"disk-analyzer\"\u003e\u003c/a\u003eDisk usage analyzers"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidiquis%2Ferdtree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolidiquis%2Ferdtree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidiquis%2Ferdtree/lists"}