From 3113331dbe5a8fead322040b0dfb73671346812f Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Sun, 8 Dec 2024 00:20:29 +0000 Subject: [PATCH] Update cheatsheets --- tldr/arch | 2 +- tldr/chown | 2 +- tldr/linux/eclean | 25 +++++++++++++++++++++++++ tldr/linux/euse | 29 +++++++++++++++++++++++++++++ tldr/linux/protontricks | 4 ++++ tldr/linux/systemd-cryptsetup | 27 +++++++++++++++++++++++++++ tldr/tesseract | 2 +- tldr/while | 4 ++++ tldr/zpaq | 33 +++++++++++++++++++++++++++++++++ 9 files changed, 125 insertions(+), 3 deletions(-) create mode 100644 tldr/linux/eclean create mode 100644 tldr/linux/euse create mode 100644 tldr/linux/systemd-cryptsetup create mode 100644 tldr/zpaq diff --git a/tldr/arch b/tldr/arch index 8d1b6962..7c8b5584 100644 --- a/tldr/arch +++ b/tldr/arch @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Display the name of the system architecture. > See also `uname`. -> More information: . +> More information: . - Display the system's architecture: diff --git a/tldr/chown b/tldr/chown index 599e1f48..5466baf6 100644 --- a/tldr/chown +++ b/tldr/chown @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # chown > Change user and group ownership of files and directories. -> More information: . +> More information: . - Change the owner user of a file/directory: diff --git a/tldr/linux/eclean b/tldr/linux/eclean new file mode 100644 index 00000000..346fda1e --- /dev/null +++ b/tldr/linux/eclean @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# eclean + +> Clean repository source files and binary packages. +> More information: . + +- Clean the source file directory: + +`sudo eclean distfiles` + +- Clean the binary package directory: + +`sudo eclean packages` + +- Clean the distfiles of all uninstalled packages, but keep the distfiles of installed packages: + +`sudo eclean --deep --package-names distfiles` + +- Clean the binary packages of all uninstalled packages, but keep the binaries of installed packages: + +`sudo eclean --deep --package-names packages` diff --git a/tldr/linux/euse b/tldr/linux/euse new file mode 100644 index 00000000..0b57807f --- /dev/null +++ b/tldr/linux/euse @@ -0,0 +1,29 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# euse + +> Enable, disable, and obtain information about Gentoo USE flags. +> More information: . + +- List active global USE flags: + +`euse --active --global` + +- List active local USE flags: + +`euse --active --local` + +- Enable a global USE flag: + +`sudo euse --enable {{use_flag}}` + +- Disable a global USE flag (put a '-' sign in front of the USE flag): + +`sudo euse --disable {{use_flag}}` + +- Remove a global USE flag: + +`sudo euse --prune {{use_flag}}` diff --git a/tldr/linux/protontricks b/tldr/linux/protontricks index d83fe4f9..d7010179 100644 --- a/tldr/linux/protontricks +++ b/tldr/linux/protontricks @@ -28,6 +28,10 @@ source: https://github.com/tldr-pages/tldr.git `protontricks -s {{game_name}}` +- Run an executable in the proton environment of a specific game: + +`protontricks-launch --appid {{appid}} {{path/to/executable.exe}}` + - Display help: `protontricks --help` diff --git a/tldr/linux/systemd-cryptsetup b/tldr/linux/systemd-cryptsetup new file mode 100644 index 00000000..0b3373b7 --- /dev/null +++ b/tldr/linux/systemd-cryptsetup @@ -0,0 +1,27 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# systemd-cryptsetup + +> Create or remove decrypted mappings of encrypted volumes. Equivalent of `cryptsetup open` and `cryptsetup close`. +> Arguments to this command are written exactly like a line in `/etc/crypttab`. It's used by systemd to unlock devices on boot. +> See also: `cryptsetup`. +> More information: . + +- Open a LUKS volume and create a decrypted mapping at `/dev/mapper/mapping_name`: + +`systemd-cryptsetup attach {{mapping_name}} {{/dev/sdXY}}` + +- Open a LUKS volume with additional options and create a decrypted mapping at `/dev/mapper/mapping_name`: + +`systemd-cryptsetup attach {{mapping_name}} {{/dev/sdXY}} none {{crypttab_options}}` + +- Open a LUKS volume with a keyfile and create a decrypted mapping at `/dev/mapper/mapping_name`: + +`systemd-cryptsetup attach {{mapping_name}} {{/dev/sdXY}} {{path/to/keyfile}} {{crypttab_options}}` + +- Remove an existing mapping: + +`systemd-cryptsetup detach {{mapping_name}}` diff --git a/tldr/tesseract b/tldr/tesseract index d39cb305..09dde084 100644 --- a/tldr/tesseract +++ b/tldr/tesseract @@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git - Specify a custom page segmentation mode (default is 3): -`tesseract -psm {{0_to_10}} {{image.png}} {{output}}` +`tesseract --psm {{0_to_10}} {{image.png}} {{output}}` - List page segmentation modes and their descriptions: diff --git a/tldr/while b/tldr/while index 18058bfd..c083034b 100644 --- a/tldr/while +++ b/tldr/while @@ -15,3 +15,7 @@ source: https://github.com/tldr-pages/tldr.git - Execute a command forever once every second: `while :; do {{command}}; sleep 1; done` + +- Execute a command until it returns a non-zero value: + +`while {{command}}; do :; done` diff --git a/tldr/zpaq b/tldr/zpaq new file mode 100644 index 00000000..dce81a37 --- /dev/null +++ b/tldr/zpaq @@ -0,0 +1,33 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# zpaq + +> Incremental journaling backup utility and archiver. +> More information: . + +- [a]dd a file or directory to a new or existing archive: + +`zpaq a {{path/to/archive.zpaq}} {{path/to/file_or_directory}}` + +- Create or add to an encrypted archive: + +`zpaq a -k{{password}} {{path/to/archive.zpaq}} {{path/to/file_or_directory}}` + +- E[x]tract the most recent versions of files: + +`zpaq x {{path/to/archive.zpaq}}` + +- [l]ist the archive contents: + +`zpaq l {{path/to/archive.zpaq}}` + +- Set the level of compression (higher means more compression but slower): + +`zpaq a {{path/to/archive.zpaq}} -m{{1|2|3|4|5}} {{path/to/file_or_directory}}` + +- E[x]tract the specified files from the archive that are not newer than the specified date: + +`zpaq x {{path/to/archive.zpaq}} {{path/in/archive/to/extract}} -to {{path/to/output}} -until {{YYYY-MM-DD}}`