|
1 | | -_p_d_u(1) General Commands Manual _p_d_u(1) |
| 1 | +[4mpdu[24m(1) General Commands Manual [4mpdu[24m(1) |
2 | 2 |
|
3 | | -NNAAMMEE |
| 3 | +[1mNAME[0m |
4 | 4 | pdu - Summarize disk usage of the set of files, recursively for directories. |
5 | 5 |
|
6 | | -SSYYNNOOPPSSIISS |
7 | | - ppdduu [----jjssoonn--iinnppuutt] [----jjssoonn--oouuttppuutt] [--bb|----bbyytteess--ffoorrmmaatt _B_Y_T_E_S___F_O_R_M_A_T] [--HH|----ddeedduupplliiccaattee--hhaarrddlliinnkkss] |
8 | | - [--xx|----oonnee--ffiillee--ssyysstteemm] [----ttoopp--ddoowwnn] [----aalliiggnn--rriigghhtt] [--qq|----qquuaannttiittyy _Q_U_A_N_T_I_T_Y] [--dd|----mmaaxx--ddeepptthh _M_A_X___D_E_P_T_H] [--ww|----ttoo‐‐ |
9 | | - ttaall--wwiiddtthh _T_O_T_A_L___W_I_D_T_H] [----ccoolluummnn--wwiiddtthh _T_R_E_E___W_I_D_T_H _B_A_R___W_I_D_T_H] [--mm|----mmiinn--rraattiioo _M_I_N___R_A_T_I_O] [----nnoo--ssoorrtt] |
10 | | - [--ss|----ssiilleenntt--eerrrroorrss] [--pp|----pprrooggrreessss] [----tthhrreeaaddss _T_H_R_E_A_D_S] [----oommiitt--jjssoonn--sshhaarreedd--ddeettaaiillss] [----oommiitt--jjssoonn--sshhaarreedd--ssuumm‐‐ |
11 | | - mmaarryy] [_F_I_L_E_S] |
| 6 | +[1mSYNOPSIS[0m |
| 7 | + [1mpdu [22m[[1m--json-input[22m] [[1m--json-output[22m] [[1m-b[22m|[1m--bytes-format [4m[22mBYTES_FORMAT[24m] [[1m-H[22m|[1m--deduplicate-hardlinks[22m] |
| 8 | + [[1m-x[22m|[1m--one-file-system[22m] [[1m--top-down[22m] [[1m--align-right[22m] [[1m-q[22m|[1m--quantity [4m[22mQUANTITY[24m] [[1m-d[22m|[1m--max-depth [4m[22mMAX_DEPTH[24m] [[1m-w[22m|[1m--to‐[0m |
| 9 | + [1mtal-width [4m[22mTOTAL_WIDTH[24m] [[1m--column-width [4m[22mTREE_WIDTH[24m [4mBAR_WIDTH[24m] [[1m-m[22m|[1m--min-ratio [4m[22mMIN_RATIO[24m] [[1m--no-sort[22m] |
| 10 | + [[1m-s[22m|[1m--silent-errors[22m] [[1m-p[22m|[1m--progress[22m] [[1m--threads [4m[22mTHREADS[24m] [[1m--omit-json-shared-details[22m] [[1m--omit-json-shared-sum‐[0m |
| 11 | + [1mmary[22m] [[4mFILES[24m] |
12 | 12 |
|
13 | | -DDEESSCCRRIIPPTTIIOONN |
| 13 | +[1mDESCRIPTION[0m |
14 | 14 | Summarize disk usage of the set of files, recursively for directories. |
15 | 15 |
|
16 | 16 | Copyright: Apache-2.0 © 2021 Hoàng Văn Khải <https://github.com/KSXGitHub/> |
17 | 17 | Sponsor: https://github.com/sponsors/KSXGitHub |
18 | 18 |
|
19 | | -OOPPTTIIOONNSS |
20 | | - [_F_I_L_E_S] |
| 19 | +[1mOPTIONS[0m |
| 20 | + [[4mFILES[24m] |
21 | 21 | List of files and/or directories |
22 | 22 |
|
23 | | - ----jjssoonn--iinnppuutt |
| 23 | + [1m--json-input[0m |
24 | 24 | Read JSON data from stdin |
25 | 25 |
|
26 | | - ----jjssoonn--oouuttppuutt |
| 26 | + [1m--json-output[0m |
27 | 27 | Print JSON data instead of an ASCII chart |
28 | 28 |
|
29 | | - --bb, ----bbyytteess--ffoorrmmaatt _<_B_Y_T_E_S___F_O_R_M_A_T_> [default: metric] |
| 29 | + [1m-b[22m, [1m--bytes-format [4m[22m<BYTES_FORMAT>[24m [default: metric] |
30 | 30 | How to display the numbers of bytes |
31 | 31 |
|
32 | | - _P_o_s_s_i_b_l_e _v_a_l_u_e_s_: |
| 32 | + [4mPossible[24m [4mvalues:[0m |
33 | 33 |
|
34 | 34 | • plain: Display plain number of bytes without units |
35 | 35 |
|
36 | 36 | • metric: Use metric scale, i.e. 1K = 1000B, 1M = 1000K, and so on |
37 | 37 |
|
38 | 38 | • binary: Use binary scale, i.e. 1K = 1024B, 1M = 1024K, and so on |
39 | 39 |
|
40 | | - --HH, ----ddeedduupplliiccaattee--hhaarrddlliinnkkss, ----ddeetteecctt--lliinnkkss, ----ddeedduuppee--lliinnkkss |
| 40 | + [1m-H[22m, [1m--deduplicate-hardlinks[22m, [1m--detect-links[22m, [1m--dedupe-links[0m |
41 | 41 | Detect and subtract the sizes of hardlinks from their parent directory totals |
42 | 42 |
|
43 | | - --xx, ----oonnee--ffiillee--ssyysstteemm |
| 43 | + [1m-x[22m, [1m--one-file-system[0m |
44 | 44 | Skip directories on different filesystems |
45 | 45 |
|
46 | | - ----ttoopp--ddoowwnn |
| 46 | + [1m--top-down[0m |
47 | 47 | Print the tree top-down instead of bottom-up |
48 | 48 |
|
49 | | - ----aalliiggnn--rriigghhtt |
| 49 | + [1m--align-right[0m |
50 | 50 | Set the root of the bars to the right |
51 | 51 |
|
52 | | - --qq, ----qquuaannttiittyy _<_Q_U_A_N_T_I_T_Y_> [default: block-size] |
| 52 | + [1m-q[22m, [1m--quantity [4m[22m<QUANTITY>[24m [default: block-size] |
53 | 53 | Aspect of the files/directories to be measured |
54 | 54 |
|
55 | | - _P_o_s_s_i_b_l_e _v_a_l_u_e_s_: |
| 55 | + [4mPossible[24m [4mvalues:[0m |
56 | 56 |
|
57 | 57 | • apparent-size: Measure apparent sizes |
58 | 58 |
|
59 | 59 | • block-size: Measure block sizes (block-count * 512B) |
60 | 60 |
|
61 | 61 | • block-count: Count numbers of blocks |
62 | 62 |
|
63 | | - --dd, ----mmaaxx--ddeepptthh, ----ddeepptthh _<_M_A_X___D_E_P_T_H_> [default: 10] |
| 63 | + [1m-d[22m, [1m--max-depth[22m, [1m--depth [4m[22m<MAX_DEPTH>[24m [default: 10] |
64 | 64 | Maximum depth to display the data. Could be either "inf" or a positive integer |
65 | 65 |
|
66 | | - --ww, ----ttoottaall--wwiiddtthh, ----wwiiddtthh _<_T_O_T_A_L___W_I_D_T_H_> |
| 66 | + [1m-w[22m, [1m--total-width[22m, [1m--width [4m[22m<TOTAL_WIDTH>[0m |
67 | 67 | Width of the visualization |
68 | 68 |
|
69 | | - ----ccoolluummnn--wwiiddtthh _<_T_R_E_E___W_I_D_T_H_> _<_B_A_R___W_I_D_T_H_> |
| 69 | + [1m--column-width [4m[22m<TREE_WIDTH>[24m [4m<BAR_WIDTH>[0m |
70 | 70 | Maximum widths of the tree column and width of the bar column |
71 | 71 |
|
72 | | - --mm, ----mmiinn--rraattiioo _<_M_I_N___R_A_T_I_O_> [default: 0.01] |
| 72 | + [1m-m[22m, [1m--min-ratio [4m[22m<MIN_RATIO>[24m [default: 0.01] |
73 | 73 | Minimal size proportion required to appear |
74 | 74 |
|
75 | | - ----nnoo--ssoorrtt |
| 75 | + [1m--no-sort[0m |
76 | 76 | Do not sort the branches in the tree |
77 | 77 |
|
78 | | - --ss, ----ssiilleenntt--eerrrroorrss, ----nnoo--eerrrroorrss |
| 78 | + [1m-s[22m, [1m--silent-errors[22m, [1m--no-errors[0m |
79 | 79 | Prevent filesystem error messages from appearing in stderr |
80 | 80 |
|
81 | | - --pp, ----pprrooggrreessss |
| 81 | + [1m-p[22m, [1m--progress[0m |
82 | 82 | Report progress being made at the expense of performance |
83 | 83 |
|
84 | | - ----tthhrreeaaddss _<_T_H_R_E_A_D_S_> [default: auto] |
| 84 | + [1m--threads [4m[22m<THREADS>[24m [default: auto] |
85 | 85 | Set the maximum number of threads to spawn. Could be either "auto", "max", or a positive integer |
86 | 86 |
|
87 | | - ----oommiitt--jjssoonn--sshhaarreedd--ddeettaaiillss |
| 87 | + [1m--omit-json-shared-details[0m |
88 | 88 | Do not output ‘.shared.details‘ in the JSON output |
89 | 89 |
|
90 | | - ----oommiitt--jjssoonn--sshhaarreedd--ssuummmmaarryy |
| 90 | + [1m--omit-json-shared-summary[0m |
91 | 91 | Do not output ‘.shared.summary‘ in the JSON output |
92 | 92 |
|
93 | | -EEXXAAMMPPLLEESS |
| 93 | +[1mEXAMPLES[0m |
94 | 94 | Show disk usage chart of current working directory |
95 | | - $$ ppdduu |
| 95 | + [1m$ pdu[0m |
96 | 96 |
|
97 | 97 | Show disk usage chart of a single file or directory |
98 | | - $$ ppdduu ppaatthh//ttoo//ffiillee//oorr//ddiirreeccttoorryy |
| 98 | + [1m$ pdu path/to/file/or/directory[0m |
99 | 99 |
|
100 | 100 | Compare disk usages of multiple files and/or directories |
101 | | - $$ ppdduu ffiillee..ttxxtt ddiirr// |
| 101 | + [1m$ pdu file.txt dir/[0m |
102 | 102 |
|
103 | 103 | Show chart in apparent sizes instead of block sizes |
104 | | - $$ ppdduu ----qquuaannttiittyy==aappppaarreenntt--ssiizzee |
| 104 | + [1m$ pdu --quantity=apparent-size[0m |
105 | 105 |
|
106 | 106 | Detect and subtract the sizes of hardlinks from their parent nodes |
107 | | - $$ ppdduu ----ddeedduupplliiccaattee--hhaarrddlliinnkkss |
| 107 | + [1m$ pdu --deduplicate-hardlinks[0m |
108 | 108 |
|
109 | 109 | Show sizes in plain numbers instead of metric units |
110 | | - $$ ppdduu ----bbyytteess--ffoorrmmaatt==ppllaaiinn |
| 110 | + [1m$ pdu --bytes-format=plain[0m |
111 | 111 |
|
112 | 112 | Show sizes in base 2¹⁰ units (binary) instead of base 10³ units (metric) |
113 | | - $$ ppdduu ----bbyytteess--ffoorrmmaatt==bbiinnaarryy |
| 113 | + [1m$ pdu --bytes-format=binary[0m |
114 | 114 |
|
115 | 115 | Show disk usage chart of all entries regardless of size |
116 | | - $$ ppdduu ----mmiinn--rraattiioo==00 |
| 116 | + [1m$ pdu --min-ratio=0[0m |
117 | 117 |
|
118 | 118 | Only show disk usage chart of entries whose size is at least 5% of total |
119 | | - $$ ppdduu ----mmiinn--rraattiioo==00..0055 |
| 119 | + [1m$ pdu --min-ratio=0.05[0m |
120 | 120 |
|
121 | 121 | Show disk usage data as JSON instead of chart |
122 | | - $$ ppdduu ----mmiinn--rraattiioo==00 ----mmaaxx--ddeepptthh==iinnff ----jjssoonn--oouuttppuutt || jjqq |
| 122 | + [1m$ pdu --min-ratio=0 --max-depth=inf --json-output | jq[0m |
123 | 123 |
|
124 | 124 | Visualize existing JSON representation of disk usage data |
125 | | - $$ ppdduu ----jjssoonn--iinnppuutt << ddiisskk--uussaaggee..jjssoonn |
| 125 | + [1m$ pdu --json-input < disk-usage.json[0m |
126 | 126 |
|
127 | | -VVEERRSSIIOONN |
| 127 | +[1mVERSION[0m |
128 | 128 | v0.21.1 |
129 | 129 |
|
130 | | - pdu 0.21.1 _p_d_u(1) |
| 130 | + pdu 0.21.1 [4mpdu[24m(1) |
0 commit comments