2021-04-04 12:26:59 +01:00
|
|
|
# compsize
|
|
|
|
|
|
|
|
> Calculate the compression ratio of a set of files on a btrfs filesystem.
|
|
|
|
> See also `btrfs filesystem` for recompressing a file by defragmenting it.
|
2025-04-25 04:34:04 +03:00
|
|
|
> More information: <https://manned.org/compsize>.
|
2021-04-04 12:26:59 +01:00
|
|
|
|
|
|
|
- Calculate the current compression ratio for a file or directory:
|
|
|
|
|
|
|
|
`sudo compsize {{path/to/file_or_directory}}`
|
|
|
|
|
|
|
|
- Don't traverse filesystem boundaries:
|
|
|
|
|
2025-04-25 04:34:04 +03:00
|
|
|
`sudo compsize {{[-x|--one-file-system]}} {{path/to/file_or_directory}}`
|
2021-04-04 12:26:59 +01:00
|
|
|
|
|
|
|
- Show raw byte counts instead of human-readable sizes:
|
|
|
|
|
2025-04-25 04:34:04 +03:00
|
|
|
`sudo compsize {{[-b|--bytes]}} {{path/to/file_or_directory}}`
|