From 22bb163ffa0542d8b1f4997f66b3dc2449bc0fd0 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Sun, 7 Dec 2025 00:23:48 +0000 Subject: [PATCH] Update cheatsheets --- tldr/bun-pm-version | 25 +++++++++++++++++++++++++ tldr/gitlab-backup | 26 ++++++++++++++++++++++++++ tldr/linux/abroot | 2 +- tldr/linux/apx | 2 +- tldr/linux/apx-pkgmanagers | 2 +- tldr/linux/apx-stacks | 2 +- tldr/linux/aurpublish | 2 +- tldr/linux/auto-cpufreq | 2 +- tldr/linux/backlight_control | 2 +- tldr/linux/beep | 2 +- tldr/linux/bluebuild | 2 +- tldr/linux/br | 24 +++--------------------- tldr/linux/braa | 2 +- tldr/linux/broot | 21 ++++++++++++++++++++- tldr/linux/chattr | 8 ++++---- tldr/linux/curlie | 2 +- tldr/linux/systemctl-mount-image | 26 ++++++++++++++++++++++++++ tldr/nix-env | 20 ++++++++++---------- tldr/objdump | 8 ++++++-- tldr/uvx | 12 ++++++++++++ 20 files changed, 143 insertions(+), 49 deletions(-) create mode 100644 tldr/bun-pm-version create mode 100644 tldr/gitlab-backup create mode 100644 tldr/linux/systemctl-mount-image create mode 100644 tldr/uvx diff --git a/tldr/bun-pm-version b/tldr/bun-pm-version new file mode 100644 index 00000000..ce6a1e9c --- /dev/null +++ b/tldr/bun-pm-version @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# bun pm version + +> Manage the `version` field in `package.json`. +> More information: . + +- Display the current package version: + +`bun pm version` + +- Set a specific version: + +`bun pm version {{9.0.1}}` + +- Bump the version using a semantic version type (`major`, `minor`, `patch`, etc.): + +`bun pm version {{major|minor|patch|premajor|preminor|prepatch|prerelease}}` + +- Set the version based on Git tags: + +`bun pm version from-git` diff --git a/tldr/gitlab-backup b/tldr/gitlab-backup new file mode 100644 index 00000000..29792a59 --- /dev/null +++ b/tldr/gitlab-backup @@ -0,0 +1,26 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# gitlab-backup + +> Manage backups for a GitLab Omnibus installation. +> See also: `gitlab-ctl`, `gitlab-runner`. +> More information: . + +- Create a full backup (default strategy): + +`sudo gitlab-backup create` + +- Create a full backup using the copy strategy: + +`sudo gitlab-backup create STRATEGY={{copy}}` + +- Restore a backup by specifying its ID: + +`sudo gitlab-backup restore BACKUP={{backup_id}}` + +- Restore a backup while skipping specific components: + +`sudo gitlab-backup restore BACKUP={{backup_id}} SKIP={{db,uploads,...}}` diff --git a/tldr/linux/abroot b/tldr/linux/abroot index 0bec6b96..dc5e3074 100644 --- a/tldr/linux/abroot +++ b/tldr/linux/abroot @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Utility providing full immutability and atomicity by transacting between 2 root partition states (A⟺B). > Updates are performed using OCI images, to ensure that the system is always in a consistent state. -> More information: . +> More information: . - Add packages to the local image (Note: After executing this command, you need to apply these changes.): diff --git a/tldr/linux/apx b/tldr/linux/apx index f5a87e42..22cf8374 100644 --- a/tldr/linux/apx +++ b/tldr/linux/apx @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # apx > Package management utility with support for multiple sources, allowing you to install packages in subsystems. -> More information: . +> More information: . - View documentation for managing package managers: diff --git a/tldr/linux/apx-pkgmanagers b/tldr/linux/apx-pkgmanagers index cd06e241..b2655fab 100644 --- a/tldr/linux/apx-pkgmanagers +++ b/tldr/linux/apx-pkgmanagers @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Manage package managers in `apx`. > Note: User-created package manager configurations are stored in `~/.local/share/apx/pkgmanagers`. -> More information: . +> More information: . - Interactively create a new package manager configuration: diff --git a/tldr/linux/apx-stacks b/tldr/linux/apx-stacks index 5c4332be..b9d8b717 100644 --- a/tldr/linux/apx-stacks +++ b/tldr/linux/apx-stacks @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Manage stacks in `apx`. > Note: User-created stack configurations are stored in `~/.local/share/apx/stacks`. -> More information: . +> More information: . - Interactively create a new stack configuration: diff --git a/tldr/linux/aurpublish b/tldr/linux/aurpublish index d4aa6c53..76c5cdb6 100644 --- a/tldr/linux/aurpublish +++ b/tldr/linux/aurpublish @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # aurpublish > Publish Arch User Repository packages. -> More information: . +> More information: . - Verify `PKGBUILD` integrity, generate `.SRCINFO`, create a commit message template, and publish the package to the AUR: diff --git a/tldr/linux/auto-cpufreq b/tldr/linux/auto-cpufreq index 73d15462..032c6da0 100644 --- a/tldr/linux/auto-cpufreq +++ b/tldr/linux/auto-cpufreq @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # auto-cpufreq > Automatic CPU speed & power optimizer. -> More information: . +> More information: . - Run `auto-cpufreq` in a specific mode: diff --git a/tldr/linux/backlight_control b/tldr/linux/backlight_control index 244f3d7e..beb48b69 100644 --- a/tldr/linux/backlight_control +++ b/tldr/linux/backlight_control @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # backlight_control > Control a linux machine's backlight using percentage values. -> More information: . +> More information: . - Increase/decrease the backlight by a specific percent count: diff --git a/tldr/linux/beep b/tldr/linux/beep index cde0ac97..f62bf015 100644 --- a/tldr/linux/beep +++ b/tldr/linux/beep @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # beep > A utility to beep the PC speaker. -> More information: . +> More information: . - Play a beep: diff --git a/tldr/linux/bluebuild b/tldr/linux/bluebuild index 56767e0a..6f732a15 100644 --- a/tldr/linux/bluebuild +++ b/tldr/linux/bluebuild @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # bluebuild > Build Containerfiles and custom images based on your `recipe.yml`. -> More information: . +> More information: . - Build a recipe: diff --git a/tldr/linux/br b/tldr/linux/br index ca20e5e8..c68a987e 100644 --- a/tldr/linux/br +++ b/tldr/linux/br @@ -5,26 +5,8 @@ source: https://github.com/tldr-pages/tldr.git --- # br -> Navigate directory trees interactively. -> See also: `broot`. -> More information: . +> This command is an alias of `broot`. -- Start and navigate the current directory tree interactively: +- View documentation for the original command: -`br` - -- Start displaying the size of files and directories: - -`br {{[-s|--sizes]}}` - -- Start displaying permissions: - -`br {{[-p|--permissions]}}` - -- Start displaying directories only: - -`br {{[-f|--only-folders]}}` - -- Start displaying hidden files and directories: - -`br {{[-h|--hidden]}}` +`tldr broot` diff --git a/tldr/linux/braa b/tldr/linux/braa index 549dcba5..d2d93237 100644 --- a/tldr/linux/braa +++ b/tldr/linux/braa @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # braa > Ultra-fast mass SNMP scanner allowing multiple hosts simultaneously. -> More information: . +> More information: . - Walk the SNMP tree of host with public string querying all OIDs under `.1.3.6`: diff --git a/tldr/linux/broot b/tldr/linux/broot index 58d2c4c6..04d74525 100644 --- a/tldr/linux/broot +++ b/tldr/linux/broot @@ -6,9 +6,28 @@ source: https://github.com/tldr-pages/tldr.git # broot > Navigate directory trees interactively. -> See also: `br`. > More information: . - Install or reinstall the `br` shell function: `broot --install` + +- Start and navigate the current directory tree interactively: + +`broot` + +- Start displaying the size of files and directories: + +`broot {{[-s|--sizes]}}` + +- Start displaying permissions: + +`broot {{[-p|--permissions]}}` + +- Start displaying directories only: + +`broot {{[-f|--only-folders]}}` + +- Start displaying hidden files and directories: + +`broot {{[-h|--hidden]}}` diff --git a/tldr/linux/chattr b/tldr/linux/chattr index cc3a08df..6c781be0 100644 --- a/tldr/linux/chattr +++ b/tldr/linux/chattr @@ -10,15 +10,15 @@ source: https://github.com/tldr-pages/tldr.git - Make a file or directory [i]mmutable to changes and deletion, even by superuser: -`chattr +i {{path/to/file_or_directory}}` +`sudo chattr +i {{path/to/file_or_directory}}` - Make a file or directory mutable: -`chattr -i {{path/to/file_or_directory}}` +`sudo chattr -i {{path/to/file_or_directory}}` - [R]ecursively make an entire directory and contents immutable: -`chattr -R +i {{path/to/directory}}` +`sudo chattr -R +i {{path/to/directory}}` - Mark a directory and its files to be interpreted in a case-insensitive manner (case-[F]olding): @@ -26,4 +26,4 @@ source: https://github.com/tldr-pages/tldr.git - Set a file to only allow [a]ppending: -`chattr +a {{path/to/file}}` +`sudo chattr +a {{path/to/file}}` diff --git a/tldr/linux/curlie b/tldr/linux/curlie index 80418dc9..2badf4ce 100644 --- a/tldr/linux/curlie +++ b/tldr/linux/curlie @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # curlie > A frontend to `curl` that adds the ease of use of `httpie`. -> More information: . +> More information: . - Send a GET request: diff --git a/tldr/linux/systemctl-mount-image b/tldr/linux/systemctl-mount-image new file mode 100644 index 00000000..4febcc4c --- /dev/null +++ b/tldr/linux/systemctl-mount-image @@ -0,0 +1,26 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# systemctl mount-image + +> Mount an image file into a unit's mount namespace. +> Only supported for the units that run within a mountspace ie, with `RootImage=`, `PrivateMounts=`, etc. +> More information: . + +- Mount an image at a specific path inside the unit's mount namespace: + +`systemctl mount-image {{unit}} /{{path/to/image}} /{{path/to/directory_inside_unit}}` + +- Mount the image’s `root` partition with read-only and no-setuid options: + +`systemctl mount-image {{unit}} /{{path/to/image}} /{{path/to/directory_inside_unit}} root:ro,nosuid` + +- Create the destination directory before mounting: + +`systemctl mount-image --mkdir {{unit}} /{{path/to/image}} /{{path/to/directory_inside_unit}}` + +- Mount an image as read-only: + +`systemctl mount-image --read-only {{unit}} /{{path/to/image}} /{{path/to/directory_inside_unit}}` diff --git a/tldr/nix-env b/tldr/nix-env index 5d36fed7..336f8b06 100644 --- a/tldr/nix-env +++ b/tldr/nix-env @@ -12,30 +12,30 @@ source: https://github.com/tldr-pages/tldr.git `nix-env {{[-q|--query]}}` -- Query installed packages: +- Query installed packages (`regex` is supported): -`nix-env {{[-q|--query]}} {{search_term}}` +`nix-env {{[-q|--query]}} {{search_pattern}}` -- Query available packages: +- Query available packages from the Nixpkgs registry: -`nix-env {{[-qa|--query --available]}} {{search_term}}` +`nix-env {{[-qa|--query --available]}} {{search_pattern}}` -- Install package: +- Install a package from the Nixpkgs registry: `nix-env {{[-iA|--install --attr]}} nixpkgs.{{pkg_name}}` -- Install a package from a URL: +- Install a package from a custom URL: `nix-env {{[-i|--install]}} {{pkg_name}} {{[-f|--file]}} {{example.com}}` -- Uninstall package: +- Uninstall a package: `nix-env {{[-e|--uninstall]}} {{pkg_name}}` -- Upgrade one package: +- Upgrade a package: `nix-env {{[-u|--upgrade]}} {{pkg_name}}` -- Upgrade all packages: +- Get usage help for a specific operation (`--install`, `--upgrade`, etc.): -`nix-env {{[-u|--upgrade]}}` +`nix-env --help --{{option_name}}` diff --git a/tldr/objdump b/tldr/objdump index e8849c6b..34c5615b 100644 --- a/tldr/objdump +++ b/tldr/objdump @@ -22,9 +22,13 @@ source: https://github.com/tldr-pages/tldr.git - Display the disassembled executable sections in Intel syntax: -`objdump {{[-M|--disassembler-options]}} intel {{[-d|--disassemble]}} {{path/to/binary}}` +`objdump {{[-d|--disassemble]}} {{path/to/binary}} {{[-M|--disassembler-options]}} intel` -- Display the symbol table: +- Display the disassembled executable sections with jump visualizations and syntax highlighting: + +`objdump {{[-d|--disassemble]}} {{path/to/binary}} --visualize-jumps={{color|extended-color}} --disassembler-color={{color|extended-color}}` + +- Display the symbol [t]able: `objdump {{[-t|--syms]}} {{path/to/binary}}` diff --git a/tldr/uvx b/tldr/uvx new file mode 100644 index 00000000..4ad660a5 --- /dev/null +++ b/tldr/uvx @@ -0,0 +1,12 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# uvx + +> This command is an alias of `uv tool run`. + +- View documentation for the original command: + +`tldr uv tool`