Update cheatsheets

This commit is contained in:
ivuorinen
2025-07-20 00:24:01 +00:00
parent 16134c78d9
commit 1ec3810968
41 changed files with 352 additions and 139 deletions

View File

@@ -10,28 +10,28 @@ source: https://github.com/tldr-pages/tldr.git
- Show filesystem usage (optionally run as root to show detailed information):
`btrfs filesystem usage {{path/to/btrfs_mount}}`
`btrfs {{[f|filesystem]}} {{[u|usage]}} {{path/to/btrfs_mount}}`
- Show usage by individual devices:
`sudo btrfs filesystem show {{path/to/btrfs_mount}}`
`sudo btrfs {{[f|filesystem]}} {{[sh|show]}} {{path/to/btrfs_mount}}`
- Defragment a single file on a btrfs filesystem (avoid while a deduplication agent is running):
`sudo btrfs filesystem defragment {{[-v|--verbose]}} {{path/to/file}}`
`sudo btrfs {{[f|filesystem]}} {{[de|defragment]}} {{[-v|--verbose]}} {{path/to/file}}`
- Defragment a directory recursively (does not cross subvolume boundaries):
`sudo btrfs filesystem defragment {{[-v|--verbose]}} -r {{path/to/directory}}`
`sudo btrfs {{[f|filesystem]}} {{[de|defragment]}} {{[-v|--verbose]}} -r {{path/to/directory}}`
- Force syncing unwritten data blocks to disk(s):
`sudo btrfs filesystem sync {{path/to/btrfs_mount}}`
`sudo btrfs {{[f|filesystem]}} {{[sy|sync]}} {{path/to/btrfs_mount}}`
- Summarize disk usage for the files in a directory recursively:
`sudo btrfs filesystem du {{[-s|--summarize]}} {{path/to/directory}}`
`sudo btrfs {{[f|filesystem]}} du {{[-s|--summarize]}} {{path/to/directory}}`
- Create a swap file:
`sudo btrfs filesystem mkswapfile --size {{8g}} --uuid {{clear|random|time|UUID_value}} {{path/to/swapfile}}`
`sudo btrfs {{[f|filesystem]}} {{[m|mkswapfile]}} --size {{8g}} --uuid {{clear|random|time|UUID_value}} {{path/to/swapfile}}`