diff --git a/tldr/duckdb b/tldr/duckdb index 167dcea7..05e88484 100644 --- a/tldr/duckdb +++ b/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)}}"` diff --git a/tldr/linux/alsamixer b/tldr/linux/alsamixer new file mode 100644 index 00000000..e2b7669d --- /dev/null +++ b/tldr/linux/alsamixer @@ -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: . + +- Select the soundcard to use: + +`alsamixer {{[-c|--card]}} {{soundcard_number}}` + +- Select mixer device to control: + +`alsamixer {{[-D|--device]}} {{device_name}}` + +- Increase volume: + +`` + +- Decrease volume: + +`` + +- Quit alsamixer: + +`` diff --git a/tldr/linux/fwupdmgr b/tldr/linux/fwupdmgr index 3412d384..70ad570d 100644 --- a/tldr/linux/fwupdmgr +++ b/tldr/linux/fwupdmgr @@ -6,9 +6,10 @@ source: https://github.com/tldr-pages/tldr.git # fwupdmgr > Update device firmware, including UEFI, using `fwupd`. -> More information: . +> See also: `fwupdtool`. +> More information: . -- 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` diff --git a/tldr/linux/fwupdtool b/tldr/linux/fwupdtool new file mode 100644 index 00000000..9722f627 --- /dev/null +++ b/tldr/linux/fwupdtool @@ -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: . + +- Display all devices detected by `fwupd`: + +`fwupdtool get-devices` + +- Install firmware from a file: + +`fwupdtool install {{path/to/firmware}}` + +- Display help: + +`fwupdtool {{[-h|--help]}}` diff --git a/tldr/linux/mkfs.fat b/tldr/linux/mkfs.fat index eab17d16..7e6a32c7 100644 --- a/tldr/linux/mkfs.fat +++ b/tldr/linux/mkfs.fat @@ -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}}` diff --git a/tldr/linux/parted b/tldr/linux/parted index efac79f4..28ce54c6 100644 --- a/tldr/linux/parted +++ b/tldr/linux/parted @@ -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: diff --git a/tldr/linux/parted-interactive b/tldr/linux/parted-interactive index 57f2d09a..ace61aaf 100644 --- a/tldr/linux/parted-interactive +++ b/tldr/linux/parted-interactive @@ -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}}` diff --git a/tldr/linux/setarch b/tldr/linux/setarch new file mode 100644 index 00000000..b628650f --- /dev/null +++ b/tldr/linux/setarch @@ -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: . + +- 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]}}`