mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-12 13:47:44 +00:00
Update cheatsheets
This commit is contained in:
25
tldr/bun-pm-version
Normal file
25
tldr/bun-pm-version
Normal file
@@ -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: <https://bun.com/docs/pm/cli/pm#version>.
|
||||
|
||||
- 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`
|
||||
26
tldr/gitlab-backup
Normal file
26
tldr/gitlab-backup
Normal file
@@ -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: <https://docs.gitlab.com/administration/backup_restore/backup_gitlab/>.
|
||||
|
||||
- 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,...}}`
|
||||
@@ -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: <https://github.com/Vanilla-OS/ABRoot>.
|
||||
> More information: <https://docs.vanillaos.org/docs/en/abroot-manpage>.
|
||||
|
||||
- Add packages to the local image (Note: After executing this command, you need to apply these changes.):
|
||||
|
||||
|
||||
@@ -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: <https://github.com/Vanilla-OS/apx>.
|
||||
> More information: <https://docs.vanillaos.org/docs/en/apx-manpage>.
|
||||
|
||||
- View documentation for managing package managers:
|
||||
|
||||
|
||||
@@ -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: <https://github.com/Vanilla-OS/apx>.
|
||||
> More information: <https://docs.vanillaos.org/docs/en/apx-manpage#pkgmanagers>.
|
||||
|
||||
- Interactively create a new package manager configuration:
|
||||
|
||||
|
||||
@@ -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: <https://github.com/Vanilla-OS/apx>.
|
||||
> More information: <https://docs.vanillaos.org/docs/en/apx-manpage#stacks>.
|
||||
|
||||
- Interactively create a new stack configuration:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# aurpublish
|
||||
|
||||
> Publish Arch User Repository packages.
|
||||
> More information: <https://github.com/eli-schwartz/aurpublish>.
|
||||
> More information: <https://github.com/eli-schwartz/aurpublish/blob/master/doc/aurpublish.1.asciidoc>.
|
||||
|
||||
- Verify `PKGBUILD` integrity, generate `.SRCINFO`, create a commit message template, and publish the package to the AUR:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# auto-cpufreq
|
||||
|
||||
> Automatic CPU speed & power optimizer.
|
||||
> More information: <https://github.com/AdnanHodzic/auto-cpufreq>.
|
||||
> More information: <https://github.com/AdnanHodzic/auto-cpufreq#auto-cpufreq-modes-and-options>.
|
||||
|
||||
- Run `auto-cpufreq` in a specific mode:
|
||||
|
||||
|
||||
@@ -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: <https://github.com/Hendrikto/backlight_control>.
|
||||
> More information: <https://github.com/Hendrikto/backlight_control#usage>.
|
||||
|
||||
- Increase/decrease the backlight by a specific percent count:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# beep
|
||||
|
||||
> A utility to beep the PC speaker.
|
||||
> More information: <https://github.com/spkr-beep/beep>.
|
||||
> More information: <https://manned.org/beep>.
|
||||
|
||||
- Play a beep:
|
||||
|
||||
|
||||
@@ -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: <https://github.com/blue-build/cli>.
|
||||
> More information: <https://github.com/blue-build/cli#how-to-use>.
|
||||
|
||||
- Build a recipe:
|
||||
|
||||
|
||||
@@ -5,26 +5,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# br
|
||||
|
||||
> Navigate directory trees interactively.
|
||||
> See also: `broot`.
|
||||
> More information: <https://manned.org/broot>.
|
||||
> 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`
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# braa
|
||||
|
||||
> Ultra-fast mass SNMP scanner allowing multiple hosts simultaneously.
|
||||
> More information: <https://github.com/mteg/braa>.
|
||||
> More information: <https://manned.org/braa>.
|
||||
|
||||
- Walk the SNMP tree of host with public string querying all OIDs under `.1.3.6`:
|
||||
|
||||
|
||||
@@ -6,9 +6,28 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# broot
|
||||
|
||||
> Navigate directory trees interactively.
|
||||
> See also: `br`.
|
||||
> More information: <https://github.com/Canop/broot>.
|
||||
|
||||
- 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]}}`
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
@@ -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: <https://github.com/rs/curlie>.
|
||||
> More information: <https://github.com/rs/curlie#usage>.
|
||||
|
||||
- Send a GET request:
|
||||
|
||||
|
||||
26
tldr/linux/systemctl-mount-image
Normal file
26
tldr/linux/systemctl-mount-image
Normal file
@@ -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: <https://www.freedesktop.org/software/systemd/man/systemctl.html#%0A%20%20%20%20%20%20%20%20%20%20%20%20mount-image%0A%20%20%20%20%20%20%20%20%20%20%20%20UNIT%0A%20%20%20%20%20%20%20%20%20%20%20%20IMAGE%0A%20%20%20%20%20%20%20%20%20%20%20%20%5BPATH%0A%20%20%20%20%20%20%20%20%20%20%20%20%5BPARTITION_NAME:MOUNT_OPTIONS%5D%5D%0A%20%20%20%20%20%20%20%20%20%20>.
|
||||
|
||||
- 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}}`
|
||||
20
tldr/nix-env
20
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}}`
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user