Update cheatsheets

This commit is contained in:
ivuorinen
2026-01-16 00:22:46 +00:00
parent 494fa25437
commit c2565bdd4e
11 changed files with 37 additions and 25 deletions

View File

@@ -23,3 +23,7 @@ source: https://github.com/tldr-pages/tldr.git
- Remove a user, and all files owned by them:
`sudo deluser --remove-all-files {{username}}`
- Remove a user from a group, without deleting the user:
`sudo deluser {{username}} {{group}}`

View File

@@ -27,7 +27,7 @@ source: https://github.com/tldr-pages/tldr.git
- [d]elete lines 1 to 5 of a file and back up the original file with a `.orig` extension:
`sed {{[-i|--in-place=]}}{{.orig}} '1,5d' {{path/to/file}}`
`sed {{[-i|--in-place=]}}.orig '1,5d' {{path/to/file}}`
- [p]rint only the first line to `stdout`:

View File

@@ -11,8 +11,12 @@ source: https://github.com/tldr-pages/tldr.git
- Create a sparsified compressed image without snapshots from an unsparsified one:
`virt-sparsify --compress {{path/to/image.qcow2}} {{path/to/image_new.qcow2}}`
`virt-sparsify --compress {{path/to/image.qcow2}} {{path/to/new_image.qcow2}}`
- Sparsify an image in-place:
`virt-sparsify --in-place {{path/to/image.img}}`
- Convert from one image format to another:
`virt-sparsify {{path/to/image}} --convert {{qcow2|raw|vdi|...}} {{path/to/new_image}}`