|
| 1 | +Summarize disk usage of the set of files, recursively for directories. |
| 2 | + |
| 3 | +Copyright: Apache-2.0 © 2021 Hoàng Văn Khải <https://github.com/KSXGitHub/> |
| 4 | +Sponsor: https://github.com/sponsors/KSXGitHub |
| 5 | + |
| 6 | +Usage: pdu [OPTIONS] [FILES]... |
| 7 | + |
| 8 | +Arguments: |
| 9 | + [FILES]... |
| 10 | + List of files and/or directories |
| 11 | + |
| 12 | +Options: |
| 13 | + --json-input |
| 14 | + Read JSON data from stdin |
| 15 | + |
| 16 | + --json-output |
| 17 | + Print JSON data instead of an ASCII chart |
| 18 | + |
| 19 | + -b, --bytes-format <BYTES_FORMAT> |
| 20 | + How to display the numbers of bytes |
| 21 | + |
| 22 | + Possible values: |
| 23 | + - plain: Display plain number of bytes without units |
| 24 | + - metric: Use metric scale, i.e. 1K = 1000B, 1M = 1000K, and so on |
| 25 | + - binary: Use binary scale, i.e. 1K = 1024B, 1M = 1024K, and so on |
| 26 | + |
| 27 | + [default: metric] |
| 28 | + |
| 29 | + -H, --deduplicate-hardlinks |
| 30 | + Detect and subtract the sizes of hardlinks from their parent directory totals |
| 31 | + |
| 32 | + [aliases: --detect-links, --dedupe-links] |
| 33 | + |
| 34 | + --top-down |
| 35 | + Print the tree top-down instead of bottom-up |
| 36 | + |
| 37 | + --align-right |
| 38 | + Set the root of the bars to the right |
| 39 | + |
| 40 | + -q, --quantity <QUANTITY> |
| 41 | + Aspect of the files/directories to be measured |
| 42 | + |
| 43 | + Possible values: |
| 44 | + - apparent-size: Measure apparent sizes |
| 45 | + - block-size: Measure block sizes (block-count * 512B) |
| 46 | + - block-count: Count numbers of blocks |
| 47 | + |
| 48 | + [default: block-size] |
| 49 | + |
| 50 | + -d, --max-depth <MAX_DEPTH> |
| 51 | + Maximum depth to display the data. Could be either "inf" or a positive integer |
| 52 | + |
| 53 | + [default: 10] |
| 54 | + [aliases: --depth] |
| 55 | + |
| 56 | + -w, --total-width <TOTAL_WIDTH> |
| 57 | + Width of the visualization |
| 58 | + |
| 59 | + [aliases: --width] |
| 60 | + |
| 61 | + --column-width <TREE_WIDTH> <BAR_WIDTH> |
| 62 | + Maximum widths of the tree column and width of the bar column |
| 63 | + |
| 64 | + -m, --min-ratio <MIN_RATIO> |
| 65 | + Minimal size proportion required to appear |
| 66 | + |
| 67 | + [default: 0.01] |
| 68 | + |
| 69 | + --no-sort |
| 70 | + Do not sort the branches in the tree |
| 71 | + |
| 72 | + -s, --silent-errors |
| 73 | + Prevent filesystem error messages from appearing in stderr |
| 74 | + |
| 75 | + [aliases: --no-errors] |
| 76 | + |
| 77 | + -p, --progress |
| 78 | + Report progress being made at the expense of performance |
| 79 | + |
| 80 | + --threads <THREADS> |
| 81 | + Set the maximum number of threads to spawn. Could be either "auto", "max", or a positive integer |
| 82 | + |
| 83 | + [default: auto] |
| 84 | + |
| 85 | + --omit-json-shared-details |
| 86 | + Do not output `.shared.details` in the JSON output |
| 87 | + |
| 88 | + --omit-json-shared-summary |
| 89 | + Do not output `.shared.summary` in the JSON output |
| 90 | + |
| 91 | + -h, --help |
| 92 | + Print help (see a summary with '-h') |
| 93 | + |
| 94 | + -V, --version |
| 95 | + Print version |
| 96 | + |
| 97 | +Examples: |
| 98 | + Show disk usage chart of current working directory |
| 99 | + $ pdu |
| 100 | + |
| 101 | + Show disk usage chart of a single file or directory |
| 102 | + $ pdu path/to/file/or/directory |
| 103 | + |
| 104 | + Compare disk usages of multiple files and/or directories |
| 105 | + $ pdu file.txt dir/ |
| 106 | + |
| 107 | + Show chart in apparent sizes instead of block sizes |
| 108 | + $ pdu --quantity=apparent-size |
| 109 | + |
| 110 | + Detect and subtract the sizes of hardlinks from their parent nodes |
| 111 | + $ pdu --deduplicate-hardlinks |
| 112 | + |
| 113 | + Show sizes in plain numbers instead of metric units |
| 114 | + $ pdu --bytes-format=plain |
| 115 | + |
| 116 | + Show sizes in base 2¹⁰ units (binary) instead of base 10³ units (metric) |
| 117 | + $ pdu --bytes-format=binary |
| 118 | + |
| 119 | + Show disk usage chart of all entries regardless of size |
| 120 | + $ pdu --min-ratio=0 |
| 121 | + |
| 122 | + Only show disk usage chart of entries whose size is at least 5% of total |
| 123 | + $ pdu --min-ratio=0.05 |
| 124 | + |
| 125 | + Show disk usage data as JSON instead of chart |
| 126 | + $ pdu --min-ratio=0 --max-depth=inf --json-output | jq |
| 127 | + |
| 128 | + Visualize existing JSON representation of disk usage data |
| 129 | + $ pdu --json-input < disk-usage.json |
0 commit comments