mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
Update cheatsheets
This commit is contained in:
10
tldr/duckdb
10
tldr/duckdb
@@ -16,10 +16,14 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`duckdb {{path/to/dbfile}}`
|
||||
|
||||
- Directly query a CSV, JSON, or Parquet file:
|
||||
- Query a CSV, JSON, or Parquet file using SQL:
|
||||
|
||||
`duckdb -c "{{SELECT * FROM 'data_source.[csv|csv.gz|json|json.gz|parquet]'}}"`
|
||||
|
||||
- Directly query a CSV, JSON, or Parquet file using the `file` view:
|
||||
|
||||
`duckdb {{data_source.[csv|csv.gz|json|json.gz|parquet]}} -c "{{ SELECT * FROM file }}"`
|
||||
|
||||
- Run an SQL script:
|
||||
|
||||
`duckdb -f {{path/to/script.sql}}`
|
||||
@@ -28,10 +32,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`duckdb {{path/to/dbfile}} -cmd "{{SELECT DISTINCT * FROM tbl}}"`
|
||||
|
||||
- Run SQL queries in file on database and keep the interactive shell open:
|
||||
|
||||
`duckdb {{path/to/dbfile}} -init {{path/to/script.sql}}`
|
||||
|
||||
- Read CSV from `stdin` and write CSV to `stdout`:
|
||||
|
||||
`cat {{path/to/source.csv}} | duckdb -c "{{COPY (FROM read_csv('/dev/stdin')) TO '/dev/stdout' WITH (FORMAT CSV, HEADER)}}"`
|
||||
|
||||
29
tldr/linux/alsamixer
Normal file
29
tldr/linux/alsamixer
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# alsamixer
|
||||
|
||||
> Graphical mixer for ALSA soundcard driver.
|
||||
> More information: <https://manned.org/man/alsamixer>.
|
||||
|
||||
- Select the soundcard to use:
|
||||
|
||||
`alsamixer {{[-c|--card]}} {{soundcard_number}}`
|
||||
|
||||
- Select mixer device to control:
|
||||
|
||||
`alsamixer {{[-D|--device]}} {{device_name}}`
|
||||
|
||||
- Increase volume:
|
||||
|
||||
`<w>`
|
||||
|
||||
- Decrease volume:
|
||||
|
||||
`<x>`
|
||||
|
||||
- Quit alsamixer:
|
||||
|
||||
`<Esc>`
|
||||
@@ -6,9 +6,10 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# fwupdmgr
|
||||
|
||||
> Update device firmware, including UEFI, using `fwupd`.
|
||||
> More information: <https://fwupd.org/>.
|
||||
> See also: `fwupdtool`.
|
||||
> More information: <https://github.com/fwupd/fwupd/blob/main/src/fwupdmgr.md>.
|
||||
|
||||
- Display all devices detected by fwupd:
|
||||
- Display all devices detected by `fwupd`:
|
||||
|
||||
`fwupdmgr get-devices`
|
||||
|
||||
@@ -23,3 +24,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- Install firmware updates:
|
||||
|
||||
`fwupdmgr update`
|
||||
|
||||
- Remount `/boot` with more privileges if update complains about a read-only filesystem:
|
||||
|
||||
`sudo mount {{[-o|--options]}} uid=1000,gid=1000,umask=0022 {{/dev/sdX}} /boot`
|
||||
|
||||
22
tldr/linux/fwupdtool
Normal file
22
tldr/linux/fwupdtool
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# fwupdtool
|
||||
|
||||
> Update device firmware manually or manipulate firmware files.
|
||||
> See also: `fwupdmgr`.
|
||||
> More information: <https://github.com/fwupd/fwupd/blob/main/src/fwupdtool.md>.
|
||||
|
||||
- Display all devices detected by `fwupd`:
|
||||
|
||||
`fwupdtool get-devices`
|
||||
|
||||
- Install firmware from a file:
|
||||
|
||||
`fwupdtool install {{path/to/firmware}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`fwupdtool {{[-h|--help]}}`
|
||||
@@ -23,3 +23,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- Use 5 instead of 2 file allocation tables:
|
||||
|
||||
`mkfs.fat -f 5 {{/dev/sdXY}}`
|
||||
|
||||
- Specify filesystem type:
|
||||
|
||||
`mkfs.fat -F {{12|16|32}} {{/dev/sdXY}}`
|
||||
|
||||
@@ -15,11 +15,15 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Create a new partition table of the specified label-type:
|
||||
|
||||
`sudo parted {{/dev/sdX}} {{[-s|--script]}} mklabel {{aix|amiga|bsd|dvh|gpt|loop|mac|msdos|pc98|sun}}`
|
||||
`sudo parted {{/dev/sdX}} mklabel {{aix|amiga|bsd|dvh|gpt|loop|mac|msdos|pc98|sun}}`
|
||||
|
||||
- Create a new `gpt` partition table with a 500MiB boot partition and give the rest for the system partition:
|
||||
- Create a new `gpt` partition table with a 500MiB boot partition and give the rest for the system partition (`--script` skips user intervention prompts):
|
||||
|
||||
`sudo parted {{/dev/sdX}} {{[-s|--script]}} mklabel gpt mkpart primary 0% 500MiB mkpart primary 500MiB 100%`
|
||||
`sudo parted {{/dev/sdX}} {{[-s|--script]}} mklabel gpt mkpart "{{boot_partition_name}}" 0% 500MiB mkpart "{{system_partition_name}}" 500MiB 100%`
|
||||
|
||||
- Set a partition to have its boot flag turned on:
|
||||
|
||||
`sudo parted {{/dev/sdX}} set {{1}} boot on`
|
||||
|
||||
- Start interactive mode with the specified disk selected:
|
||||
|
||||
|
||||
@@ -21,7 +21,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`select {{/dev/sdX}}`
|
||||
|
||||
- Create a 16 GB partition with the specified filesystem in interactive mode:
|
||||
- Create a 16 GB partition with the specified filesystem in interactive mode (`GPT` partition table):
|
||||
|
||||
`mkpart {{partition_name}} {{btrfs|ext2|ext3|ext4|fat16|fat32|hfs|hfs+|linux-swap|ntfs|reiserfs|udf|xfs}} {{0%}} {{16G}}`
|
||||
|
||||
- Create a 16 GB partition with the specified filesystem in interactive mode (`MBR` partition table):
|
||||
|
||||
`mkpart {{primary|logical|extended}} {{btrfs|ext2|ext3|ext4|fat16|fat32|hfs|hfs+|linux-swap|ntfs|reiserfs|udf|xfs}} {{0%}} {{16G}}`
|
||||
|
||||
|
||||
30
tldr/linux/setarch
Normal file
30
tldr/linux/setarch
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# setarch
|
||||
|
||||
> Change the reported architecture for a program's execution, primarily used to modify how programs behave based on system architecture.
|
||||
> Useful for compatibility testing or running legacy applications.
|
||||
> More information: <https://manned.org/setarch.8>.
|
||||
|
||||
- Run a command as if the machine architecture is `i686` (useful for running 32-bit apps on a 64-bit kernel):
|
||||
|
||||
`setarch i686 {{command}}`
|
||||
|
||||
- Run a shell with the `x86_64` architecture:
|
||||
|
||||
`setarch x86_64 {{bash}}`
|
||||
|
||||
- Disable randomization of the virtual address space:
|
||||
|
||||
`setarch {{linux32}} {{[-R|--addr-no-randomize]}} {{command}}`
|
||||
|
||||
- List supported architectures:
|
||||
|
||||
`setarch --list`
|
||||
|
||||
- Display help:
|
||||
|
||||
`setarch {{[-h|--help]}}`
|
||||
Reference in New Issue
Block a user