mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-16 21:49:14 +00:00
Update cheatsheets
This commit is contained in:
@@ -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}}`
|
||||
|
||||
@@ -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`:
|
||||
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
Reference in New Issue
Block a user