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