Skip to content

Commit 061b311

Browse files
committed
README: Document more CLI options
1 parent 0e51f68 commit 061b311

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,15 @@ You can start browsing the results instantly; btdu will keep collecting samples
9191

9292
Run `btdu --help` for more usage information.
9393

94-
See [CONCEPTS.md](CONCEPTS.md) for information about some btdu / btrfs concepts, such as represented / exclusive / shared size.
94+
### Sampling options
95+
96+
`--expert` collects additional metrics; `--physical` switches the addressing mode from logical to physical, causing btdu to measure physical disk space.
97+
98+
Use `--prefer=PATTERN` and `--ignore=PATTERN` to control which path represents shared extents. Patterns use glob syntax (`*`, `**`, etc.) as absolute paths from the filesystem root. Example: `--prefer=/data/.snapshots`
99+
100+
`--max-samples`, `--max-time`, and `--min-resolution` control when btdu stops sampling (and, in headless mode, exits).
101+
102+
See [CONCEPTS.md](CONCEPTS.md) for more information about btdu / btrfs concepts, such as represented / exclusive / shared size.
95103

96104
### Headless mode
97105

@@ -118,7 +126,15 @@ Press <kbd>*</kbd> to invert marks on the current screen.
118126

119127
In [`--expert` mode](CONCEPTS.md#size-metrics), btdu will show the total exclusive size of (i.e. how much would be freed by deleting) the marked items it the top status bar.
120128

121-
Marks are saved in exported `.json` files; a boolean field named `"mark"` will be present on marked nodes. Press <kbd>⇧ Shift</kbd><kbd>O</kbd> to save an export file during an interactive session.
129+
Marks are saved in exported `.json` files; a boolean field named `"mark"` will be present on marked nodes.
130+
131+
### Import and export
132+
133+
Press <kbd>⇧ Shift</kbd><kbd>O</kbd> to save an export file during an interactive session; alternatively, pass `--export=FILENAME` to do so automatically on exit.
134+
135+
Exports can be loaded with `--import`. Then, specify a file name instead of the filesystem path to sample.
136+
137+
For a more portable (but less detailed) export, use `--du`; the resulting file should then be loadable by any disk usage analyzer which supports loading `du` output.
122138

123139
License
124140
-------

0 commit comments

Comments
 (0)