Update cheatsheets

This commit is contained in:
ivuorinen
2025-11-12 00:20:22 +00:00
parent 3f758d63f7
commit 8b085234e1
6 changed files with 193 additions and 0 deletions

33
tldr/linux/col Normal file
View File

@@ -0,0 +1,33 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# col
> Filter reverse line feeds from input.
> More information: <https://manned.org/col>.
- Filter reverse line feeds from input:
`{{command}} | col`
- Filter reverse line feeds and output with spaces instead of tabs:
`{{command}} | col {{[-x|--spaces]}}`
- Remove backspaces, output only the last character written to each position:
`{{command}} | col {{[-b|--no-backspaces]}}`
- Specify a buffer size with a specific number of lines:
`{{command}} | col {{[-l|--lines]}} {{num}}`
- Format a manual page for viewing with `less`:
`man ls | col {{[-b|--no-backspaces]}} | less`
- Process a file with reverse line feeds and save the cleaned output:
`cat {{path/to/input_file}} | col {{[-x|--spaces]}} > {{output_file}}`

42
tldr/linux/gdisk Normal file
View File

@@ -0,0 +1,42 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# gdisk
> GPT (GUID Partition Table) disk partitioning tool.
> See also: `cfdisk`, `fdisk`, `parted`.
> More information: <https://manned.org/gdisk>.
- List partitions:
`sudo gdisk {{[-l|--list]}}`
- Start the interactive partition manipulator:
`sudo gdisk {{/dev/sdX}}`
- Open a help menu:
`<?>`
- Print the [p]artition table:
`<p>`
- Add a [n]ew partition:
`<n>`
- Select a partition to [d]elete:
`<d>`
- [w]rite table to disk and exit:
`<w>`
- [q]uit without saving changes:
`<q>`

View File

@@ -0,0 +1,25 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# lstopo-no-graphics
> Manage and query hardware topology information.
> More information: <https://manned.org/lstopo-no-graphics>.
- Display the machine topology in a tree format:
`lstopo-no-graphics`
- Display only physical cores (ignore logical processors):
`lstopo-no-graphics --only pu`
- Display the topology with physical indexes:
`lstopo-no-graphics {{[-p|--physical]}}`
- Display help:
`lstopo-no-graphics {{[-h|--help]}}`

View File

@@ -0,0 +1,25 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# systemctl reload-or-restart
> Reload `systemd` unit(s) otherwise restart them.
> More information: <https://www.freedesktop.org/software/systemd/man/systemctl.html#reload-or-restart%20PATTERN%E2%80%A6>.
- Reload or restart a unit:
`systemctl reload-or-restart {{unit}}`
- Reload or restart multiple units matching a pattern:
`systemctl reload-or-restart {{pattern}}`
- Run the command without waiting for the operation to complete:
`systemctl reload-or-restart {{unit}} --no-block`
- Apply the command only to user units:
`systemctl reload-or-restart {{unit}} --user`