From d47b8df328992c475487b531fd3de48b3cbfff0d Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Fri, 29 Aug 2025 00:19:35 +0000 Subject: [PATCH] Update cheatsheets --- tldr/git-diff | 4 ++-- tldr/linux/cec-ctl | 22 ++++++++++++++++++++++ tldr/linux/dnf-download | 23 +++++++++++++++++++++++ tldr/linux/dpkg-reconfigure | 4 ++++ tldr/linux/fbset | 2 +- tldr/linux/fsadm | 29 +++++++++++++++++++++++++++++ tldr/linux/mkinitcpio | 4 ++-- tldr/linux/rpm | 2 +- tldr/linux/systemctl-edit | 21 +++++++++++++++++++++ tldr/mullvad | 8 ++++++++ tldr/surfraw | 2 +- tldr/vc | 12 ++++++++++++ tldr/vercel | 8 ++++---- 13 files changed, 130 insertions(+), 11 deletions(-) create mode 100644 tldr/linux/cec-ctl create mode 100644 tldr/linux/dnf-download create mode 100644 tldr/linux/fsadm create mode 100644 tldr/linux/systemctl-edit create mode 100644 tldr/vc diff --git a/tldr/git-diff b/tldr/git-diff index 04e156e9..3b8740d3 100644 --- a/tldr/git-diff +++ b/tldr/git-diff @@ -36,6 +36,6 @@ source: https://github.com/tldr-pages/tldr.git `git diff {{branch_1}}..{{branch_2}} {{path/to/file}}` -- Compare different files from the current branch to other branch: +- Compare different files from the current branch to another branch: -`git diff {{branch}}:{{path/to/file2}} {{path/to/file}}` +`git diff {{other_branch}}:{{path/to/file2}} {{path/to/file1}}` diff --git a/tldr/linux/cec-ctl b/tldr/linux/cec-ctl new file mode 100644 index 00000000..543c6a3f --- /dev/null +++ b/tldr/linux/cec-ctl @@ -0,0 +1,22 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# cec-ctl + +> Control kernel CEC devices. +> See also: `cec-client`. +> More information: . + +- List CEC devices: + +`cec-ctl --list-devices` + +- Monitor CEC traffic: + +`sudo cec-ctl {{[-m|--monitor]}}` + +- Show CEC topology: + +`cec-ctl {{[-S|--show-topology]}}` diff --git a/tldr/linux/dnf-download b/tldr/linux/dnf-download new file mode 100644 index 00000000..3c94d40b --- /dev/null +++ b/tldr/linux/dnf-download @@ -0,0 +1,23 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# dnf download + +> Download RPM packages from the DNF repositories. +> Not default to `dnf` but supported via `dnf-plugins-core`. +> See also: `dnf`. +> More information: . + +- Download the latest version of a package to the current directory: + +`dnf download {{package}}` + +- Download a package to a specific directory (the directory must exist): + +`dnf download {{package}} --destdir {{path/to/directory}}` + +- Print the URL where the RPM package can be downloaded from: + +`dnf download --url {{package}}` diff --git a/tldr/linux/dpkg-reconfigure b/tldr/linux/dpkg-reconfigure index 0f844662..b69179ca 100644 --- a/tldr/linux/dpkg-reconfigure +++ b/tldr/linux/dpkg-reconfigure @@ -11,3 +11,7 @@ source: https://github.com/tldr-pages/tldr.git - Reconfigure one or more packages: `dpkg-reconfigure {{package1 package2 ...}}` + +- Reconfigure console font setup: + +`dpkg-reconfigure console-setup` diff --git a/tldr/linux/fbset b/tldr/linux/fbset index f4086833..8c93230d 100644 --- a/tldr/linux/fbset +++ b/tldr/linux/fbset @@ -18,4 +18,4 @@ source: https://github.com/tldr-pages/tldr.git - Set an arbitrary framebuffer mode: -`sudo fbset {{TTY_horizontal}} {{TTY_vertical}} {{monitor_horizontal}} {{monitor_vertical}} {{color_depth}}` +`sudo fbset {{[-g|--geometry]}} {{TTY_horizontal}} {{TTY_vertical}} {{monitor_horizontal}} {{monitor_vertical}} {{color_depth}}` diff --git a/tldr/linux/fsadm b/tldr/linux/fsadm new file mode 100644 index 00000000..b4e4f425 --- /dev/null +++ b/tldr/linux/fsadm @@ -0,0 +1,29 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# fsadm + +> Check or resize a filesystem on a device. +> More information: . + +- Check a filesystem for errors: + +`fsadm check {{/dev/vg_name/lv_name}}` + +- Perform a dry-run resize to a specific size (no changes made): + +`fsadm {{[-n|--dry-run]}} resize {{/dev/vg_name/lv_name}} {{10G}}` + +- Grow a filesystem to fill the entire device (omit the size): + +`fsadm resize {{/dev/vg_name/lv_name}}` + +- Resize the filesystem and the underlying logical volume together: + +`fsadm {{[-l|--lvresize]}} resize {{/dev/vg_name/lv_name}} {{100G}}` + +- For ext2/3/4, unmount and resize offline: + +`fsadm {{[-e|--ext-offline]}} resize {{/dev/vg_name/lv_name}} {{20G}}` diff --git a/tldr/linux/mkinitcpio b/tldr/linux/mkinitcpio index f7ffb48a..04ba1ef4 100644 --- a/tldr/linux/mkinitcpio +++ b/tldr/linux/mkinitcpio @@ -18,11 +18,11 @@ source: https://github.com/tldr-pages/tldr.git - Generate a ramdisk environment based on the `linux` preset: -`sudo mkinitcpio {{[-p|--preset]}} {{linux}}` +`sudo mkinitcpio {{[-p|--preset]}} linux` - Generate a ramdisk environment based on the `linux-lts` preset: -`sudo mkinitcpio {{[-p|--preset]}} {{linux-lts}}` +`sudo mkinitcpio {{[-p|--preset]}} linux-lts` - Generate an initramfs image using an alternative configuration file: diff --git a/tldr/linux/rpm b/tldr/linux/rpm index cd763539..0174a89b 100644 --- a/tldr/linux/rpm +++ b/tldr/linux/rpm @@ -11,7 +11,7 @@ source: https://github.com/tldr-pages/tldr.git - Show version of httpd package: -`rpm {{[-q|--query]}} {{httpd}}` +`rpm {{[-q|--query]}} httpd` - List versions of all matching packages: diff --git a/tldr/linux/systemctl-edit b/tldr/linux/systemctl-edit new file mode 100644 index 00000000..bd2d12a3 --- /dev/null +++ b/tldr/linux/systemctl-edit @@ -0,0 +1,21 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# systemctl edit + +> Edit systemd unit files. +> More information: . + +- Replace a unit file non-destructively: + +`sudo systemctl edit {{unit_file}}` + +- Edit an unit file: + +`sudo systemctl edit {{[-l|--full]}} {{unit_file}}` + +- Create a new unit file: + +`sudo systemctl edit {{[-lf|--full --force]}} {{unit_file}}` diff --git a/tldr/mullvad b/tldr/mullvad index 82e629b9..07d3db41 100644 --- a/tldr/mullvad +++ b/tldr/mullvad @@ -17,6 +17,14 @@ source: https://github.com/tldr-pages/tldr.git `mullvad lan set allow` +- Select a server in a specific city: + +`mullvad relay set location {{se}} {{mma}}` + +- Select a specific server: + +`mullvad relay set location {{se-mma-wg-001}}` + - Establish the VPN tunnel: `mullvad connect` diff --git a/tldr/surfraw b/tldr/surfraw index 847310df..f5dcb285 100644 --- a/tldr/surfraw +++ b/tldr/surfraw @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Query a variety of web search engines. > Consists of a collection of elvi, each of which knows how to search a website. -> More information: . +> More information: . - Display the list of supported website search scripts (elvi): diff --git a/tldr/vc b/tldr/vc new file mode 100644 index 00000000..dc0fcf6f --- /dev/null +++ b/tldr/vc @@ -0,0 +1,12 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# vc + +> This command is an alias of `vercel`. + +- View documentation for the original command: + +`tldr vercel` diff --git a/tldr/vercel b/tldr/vercel index a3e1de47..5d0495ec 100644 --- a/tldr/vercel +++ b/tldr/vercel @@ -24,13 +24,13 @@ source: https://github.com/tldr-pages/tldr.git `vercel init` -- Deploy with Environment Variables: +- Deploy with environment variables: -`vercel --env {{ENV}}={{var}}` +`vercel {{[-e|--env]}} {{ENV}}={{var}}` -- Build with Environment Variables: +- Build with environment variables: -`vercel --build-env {{ENV}}={{var}}` +`vercel {{[-b|--build-env]}} {{ENV}}={{var}}` - Set default regions to enable the deployment on: