From bda9e5a061d6144edd142eea97752542fa37d413 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Wed, 17 Dec 2025 00:21:28 +0000 Subject: [PATCH] Update cheatsheets --- tldr/[ | 8 ++++++-- tldr/[[ | 8 ++++---- tldr/bg | 2 +- tldr/command | 2 +- tldr/continue | 2 +- tldr/crane | 4 ++-- tldr/crane-copy | 10 +++++----- tldr/enable | 4 ++++ tldr/exo | 2 +- tldr/false | 7 ++++++- tldr/fc | 3 ++- tldr/fg | 2 +- tldr/for | 2 +- tldr/ftp | 14 +++++++------- tldr/getopts | 2 +- tldr/gitui | 30 +++++++++++++++--------------- tldr/help | 4 ++-- tldr/let | 1 - tldr/linux/explodepkg | 18 ++++++++++++++++++ tldr/linux/fatrace | 7 ++++++- tldr/linux/imhex | 37 +++++++++++++++++++++++++++++++++++++ tldr/linux/inotifywait | 1 + tldr/linux/jobs | 1 + tldr/linux/pkgdiff | 21 +++++++++++++++++++++ tldr/linux/pkgtool | 30 ++++++++++++++++++++++++++++++ tldr/linux/strace | 1 + tldr/linux/unzipsfx | 2 +- tldr/linux/upgradepkg | 30 ++++++++++++++++++++++++++++++ tldr/mariadb | 4 ++-- tldr/podman-export | 18 ++++++++++++++++++ tldr/podman-image-load | 12 ++++++++++++ tldr/podman-import | 26 ++++++++++++++++++++++++++ tldr/podman-load | 26 ++++++++++++++++++++++++++ tldr/podman-save | 26 ++++++++++++++++++++++++++ tldr/return | 4 +++- tldr/shopt | 2 +- tldr/time | 2 +- tldr/times | 3 ++- tldr/true | 8 ++++++-- tldr/ulimit | 2 +- tldr/unset | 12 ++++++------ tldr/usql | 4 ++-- tldr/xml | 2 +- 43 files changed, 339 insertions(+), 67 deletions(-) create mode 100644 tldr/linux/explodepkg create mode 100644 tldr/linux/imhex create mode 100644 tldr/linux/pkgdiff create mode 100644 tldr/linux/pkgtool create mode 100644 tldr/linux/upgradepkg create mode 100644 tldr/podman-export create mode 100644 tldr/podman-image-load create mode 100644 tldr/podman-import create mode 100644 tldr/podman-load create mode 100644 tldr/podman-save diff --git a/tldr/[ b/tldr/[ index dea790ef..51ca4978 100644 --- a/tldr/[ +++ b/tldr/[ @@ -10,9 +10,13 @@ source: https://github.com/tldr-pages/tldr.git > See also: `test`. > More information: . -- Test if a given variable is equal/not equal to the specified string: +- Test if a given variable is equal to the specified string: -`[ "${{variable}}" {{=|!=}} "{{string}}" ]` +`[ "${{variable}}" = "{{string}}" ]` + +- Test if a given variable is not equal to the specified string: + +`[ "${{variable}}" != "{{string}}" ]` - Test if a given variable is [eq]ual/[n]ot [e]qual/[g]reater [t]han/[l]ess [t]han/[g]reater than or [e]qual/[l]ess than or [e]qual to the specified number: diff --git a/tldr/[[ b/tldr/[[ index f6b4b22f..13d6f7c7 100644 --- a/tldr/[[ +++ b/tldr/[[ @@ -9,13 +9,13 @@ source: https://github.com/tldr-pages/tldr.git > Returns a status of 0 if the condition evaluates to true, 1 if it evaluates to false. > More information: . -- Test if a given variable is equal/not equal to the specified string: +- Test if a given variable is equal to the specified string or glob: -`[[ ${{variable}} {{==|!=}} "{{string}}" ]]` +`[[ ${{variable}} == "{{string}}" ]]` -- Test if a given string conforms the specified glob/`regex`: +- Test if a given string conforms the specified `regex`: -`[[ ${{variable}} {{==|=~}} {{pattern}} ]]` +`[[ ${{variable}} =~ {{pattern}} ]]` - Test if a given variable is [eq]ual/[n]ot [e]qual/[g]reater [t]han/[l]ess [t]han/[g]reater than or [e]qual/[l]ess than or [e]qual to the specified number: diff --git a/tldr/bg b/tldr/bg index e58fa03d..ae0b3584 100644 --- a/tldr/bg +++ b/tldr/bg @@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git --- # bg -> Resume suspended jobs (e.g. using ``), and keeps them running in the background. +> Resume suspended jobs (e.g. using ``), and keep them running in the background. > See also: `jobs`, `fg`, `disown`. > More information: . diff --git a/tldr/command b/tldr/command index 0d8b6b0e..b8f5befe 100644 --- a/tldr/command +++ b/tldr/command @@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git --- # command -> Command forces the shell to execute the program and ignore any functions, builtins and aliases with the same name. +> Force the shell to execute the program and ignore any functions, builtins, and aliases with the same name. > More information: . - Execute the `ls` program literally, even if an `ls` alias exists: diff --git a/tldr/continue b/tldr/continue index bdb74754..6d0a40db 100644 --- a/tldr/continue +++ b/tldr/continue @@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git --- # continue -> Skip to the next iteration of a `for`, `while`, `until` or `select` loop. +> Skip to the next iteration of a `for`, `while`, `until`, or `select` loop. > More information: . - Skip to the next iteration: diff --git a/tldr/crane b/tldr/crane index 2530609f..e7d70dab 100644 --- a/tldr/crane +++ b/tldr/crane @@ -33,9 +33,9 @@ source: https://github.com/tldr-pages/tldr.git `crane tag {{image}} {{tag}}` -- Efficiently copy a remote image from `src` to `dst` while retaining the digest value: +- Efficiently copy a remote image while retaining the digest value: -`crane copy src dst {{[-a|--all-tags]}}` +`crane {{[cp|copy]}} {{source}} {{destination}} {{[-a|--all-tags]}}` - Delete an image reference from its registry: diff --git a/tldr/crane-copy b/tldr/crane-copy index 4f55b60b..780771b6 100644 --- a/tldr/crane-copy +++ b/tldr/crane-copy @@ -10,20 +10,20 @@ source: https://github.com/tldr-pages/tldr.git - Copy an image from source to target: -`crane copy {{source}} {{target}}` +`crane {{[cp|copy]}} {{source}} {{target}}` - Copy all tags: -`crane copy {{source}} {{target}} {{[-a|--all-tags]}}` +`crane {{[cp|copy]}} {{source}} {{target}} {{[-a|--all-tags]}}` - Set the maximum number of concurrent copies, defaults to GOMAXPROCS: -`crane copy {{source}} {{target}} {{[-j|--jobs]}} {{int}}` +`crane {{[cp|copy]}} {{source}} {{target}} {{[-j|--jobs]}} {{int}}` - Avoid overwriting existing tags in target: -`crane copy {{source}} {{target}} {{[-n|--no-clobber]}}` +`crane {{[cp|copy]}} {{source}} {{target}} {{[-n|--no-clobber]}}` - Display help: -`crane copy {{[-h|--help]}}` +`crane {{[cp|copy]}} {{[-h|--help]}}` diff --git a/tldr/enable b/tldr/enable index 947cec58..db46b4a8 100644 --- a/tldr/enable +++ b/tldr/enable @@ -15,3 +15,7 @@ source: https://github.com/tldr-pages/tldr.git - Disable a builtin (works in Bash only): `enable -n {{command}}` + +- Re-enable a builtin: + +`enable {{command}}` diff --git a/tldr/exo b/tldr/exo index 0f229b52..6f0f0179 100644 --- a/tldr/exo +++ b/tldr/exo @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # exo > Manage the Exoscale services. -> Some subcommands such as `exo compute` have their own usage documentation. +> Some subcommands such as `compute` have their own usage documentation. > More information: . - Configure the exo command-line: diff --git a/tldr/false b/tldr/false index ec6e7a7f..9a972432 100644 --- a/tldr/false +++ b/tldr/false @@ -6,8 +6,13 @@ source: https://github.com/tldr-pages/tldr.git # false > Returns a non-zero exit code. -> More information: . +> See also: `true`. +> More information: . - Return a non-zero exit code: `false` + +- Make a command always exit with 1: + +`{{command}} && false` diff --git a/tldr/fc b/tldr/fc index bcef6395..f5acd3f9 100644 --- a/tldr/fc +++ b/tldr/fc @@ -5,7 +5,8 @@ source: https://github.com/tldr-pages/tldr.git --- # fc -> Open the most recent command for editing and then run it. +> Open the recent commands for editing and then run them. +> See also: `history`. > More information: . - Open the last command in the default system editor and run it after editing: diff --git a/tldr/fg b/tldr/fg index 7762092a..5bc4b2f4 100644 --- a/tldr/fg +++ b/tldr/fg @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # fg > Run jobs in foreground. -> See also: `jobs`, `bg`, `disown`. +> See also: `jobs`, `bg`, `disown`, `%`. > More information: . - Bring most recently suspended or running background job to foreground: diff --git a/tldr/for b/tldr/for index c59ed1d0..2532c0c5 100644 --- a/tldr/for +++ b/tldr/for @@ -8,7 +8,7 @@ source: https://github.com/tldr-pages/tldr.git > Perform a command several times. > More information: . -- Iterate through command line arguments: +- Iterate through command line parameters: `for {{variable}}; do {{echo $variable}}; done` diff --git a/tldr/ftp b/tldr/ftp index 762753bd..4aab25b4 100644 --- a/tldr/ftp +++ b/tldr/ftp @@ -8,7 +8,7 @@ source: https://github.com/tldr-pages/tldr.git > Tools to interact with a server via File Transfer Protocol. > More information: . -- Connect to an FTP server: +- Connect to an FTP server and run in interactive mode: `ftp {{ftp.example.com}}` @@ -16,26 +16,26 @@ source: https://github.com/tldr-pages/tldr.git `ftp {{ip_address}} {{port}}` -- Switch to binary transfer mode (graphics, compressed files, etc): +- [Interactive] Switch to binary transfer mode (graphics, compressed files, etc): `binary` -- Transfer multiple files without prompting for confirmation on every file: +- [Interactive] Transfer multiple files without prompting for confirmation on every file: `prompt off` -- Download multiple files (glob expression): +- [Interactive] Download multiple files (glob expression): `mget {{*.png}}` -- Upload multiple files (glob expression): +- [Interactive] Upload multiple files (glob expression): `mput {{*.zip}}` -- Delete multiple files on the remote server: +- [Interactive] Delete multiple files on the remote server: `mdelete {{*.txt}}` -- Rename a file on the remote server: +- [Interactive] Rename a file on the remote server: `rename {{original_filename}} {{new_filename}}` diff --git a/tldr/getopts b/tldr/getopts index 647192c5..d6771f5c 100644 --- a/tldr/getopts +++ b/tldr/getopts @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # getopts > Parse shell options from arguments. -> This command does not support longform options and thus using `getopt` is recommended instead. +> Note: This command does not support longform options and thus using `getopt` is recommended instead. > More information: . - Check if an option is the first set option in the current context: diff --git a/tldr/gitui b/tldr/gitui index a8393323..c79bbc4f 100644 --- a/tldr/gitui +++ b/tldr/gitui @@ -7,15 +7,23 @@ source: https://github.com/tldr-pages/tldr.git > A lightweight keyboard-only TUI for Git. > See also: `tig`, `git-gui`. -> More information: . +> More information: . -- Specify the color theme (defaults to `theme.ron`): +- Start `gitui` for the repository in the current directory: -`gitui --theme {{theme}}` +`gitui` -- Store logging output into a cache directory: +- Specify the filename of the color theme loaded from the config directory (defaults to `theme.ron`): -`gitui --logging` +`gitui {{[-t|--theme]}} {{theme2.ron}}` + +- Store logging output into a specific file: + +`gitui --logfile {{path/to/file}}` + +- Inspect a specific file inside the repository in the current directory: + +`gitui {{[-f|--file]}} {{path/to/file}}` - Use notify-based file system watcher instead of tick-based update: @@ -27,16 +35,8 @@ source: https://github.com/tldr-pages/tldr.git - Use a specific Git directory: -`gitui --directory {{path/to/directory}}` +`gitui {{[-d|--directory]}} {{path/to/directory}}` - Use a specific working directory: -`gitui --workdir {{path/to/directory}}` - -- Display help: - -`gitui --help` - -- Display version: - -`gitui --version` +`gitui {{[-w|--workdir]}} {{path/to/directory}}` diff --git a/tldr/help b/tldr/help index 1af87157..7162b2a9 100644 --- a/tldr/help +++ b/tldr/help @@ -22,11 +22,11 @@ source: https://github.com/tldr-pages/tldr.git - Print instructions on how to use `[[ ]]` for conditional commands: -`help [[ ]]` +`help [[` - Print instruction on how to use `(( ))` to evaluate arithmetic expressions: -`help \( \)` +`help \(` - Print instructions on how to use the `cd` command: diff --git a/tldr/let b/tldr/let index 8fcf8c83..fba8ee57 100644 --- a/tldr/let +++ b/tldr/let @@ -6,7 +6,6 @@ source: https://github.com/tldr-pages/tldr.git # let > Evaluate arithmetic expressions in shell. -> Supports variables, operators, and conditional expressions. > More information: . - Evaluate a simple arithmetic expression: diff --git a/tldr/linux/explodepkg b/tldr/linux/explodepkg new file mode 100644 index 00000000..366aabdc --- /dev/null +++ b/tldr/linux/explodepkg @@ -0,0 +1,18 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# explodepkg + +> Extract the contents of a Slackware package to the current directory. +> See also: `installpkg`, `removepkg`, `upgradepkg`, `makepkg`, `pkgtool`. +> More information: . + +- Extract a package to the current directory: + +`explodepkg {{path/to/package.tgz}}` + +- Extract multiple packages to the current directory: + +`explodepkg {{path/to/package1.tgz}} {{path/to/package2.tgz}}` diff --git a/tldr/linux/fatrace b/tldr/linux/fatrace index acdc3318..dbc977d9 100644 --- a/tldr/linux/fatrace +++ b/tldr/linux/fatrace @@ -6,12 +6,17 @@ source: https://github.com/tldr-pages/tldr.git # fatrace > Report file access events. +> See also: `inotifywait`. > More information: . - Print file access events in all mounted filesystems to `stdout`: `sudo fatrace` +- Limit output to a program with a specific name: + +`sudo fatrace {{[-C|--command]}} {{program_name}}` + - Print file access events on the mount of the current directory, with timestamps, to `stdout`: -`sudo fatrace {{[-c|--current-mount]}} {{[-t|--timestamp]}}` +`sudo fatrace {{[-ct|--current-mount --timestamp]}}` diff --git a/tldr/linux/imhex b/tldr/linux/imhex new file mode 100644 index 00000000..6c536cc8 --- /dev/null +++ b/tldr/linux/imhex @@ -0,0 +1,37 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# imhex + +> Hex editor for reverse engineers and programmers. +> More information: . + +- Open a file in ImHex: + +`imhex {{path/to/file}}` + +- Create a new empty file: + +`imhex --new` + +- Open a file in the currently running ImHex instance and select a range of bytes (offsets in hexadecimal): + +`imhex --open {{path/to/file}} --select {{0xstart_offset}} {{0xend_offset}}` + +- Display information about a file: + +`imhex --file-info {{path/to/file}}` + +- Calculate the hash of a file using a specific algorithm (`md5`, `sha1`, `sha224`, `sha256`, `sha384`, `sha512`): + +`imhex --hash {{algorithm}} {{path/to/file}}` + +- Generate a hex dump of a file: + +`imhex --hexdump {{path/to/file}}` + +- Display version: + +`imhex --version` diff --git a/tldr/linux/inotifywait b/tldr/linux/inotifywait index abbcfd6c..e2dd0484 100644 --- a/tldr/linux/inotifywait +++ b/tldr/linux/inotifywait @@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # inotifywait > Waits for changes to files. +> See also: `fatrace`. > More information: . - Watch a specific file for events, exiting after the first one: diff --git a/tldr/linux/jobs b/tldr/linux/jobs index 172056f3..19b30f8a 100644 --- a/tldr/linux/jobs +++ b/tldr/linux/jobs @@ -7,6 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Shell builtin for viewing information about processes spawned by the current shell. > Options other than `-l` and `-p` are exclusive to Bash. +> See also: `fg`, `bg`, `disown`, `%`. > More information: . - View jobs spawned by the current shell: diff --git a/tldr/linux/pkgdiff b/tldr/linux/pkgdiff new file mode 100644 index 00000000..8caaef2d --- /dev/null +++ b/tldr/linux/pkgdiff @@ -0,0 +1,21 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# pkgdiff + +> Compare the file contents of two Slackware packages. +> More information: . + +- Compare two packages and display differences: + +`pkgdiff {{path/to/package1.txz}} {{path/to/package2.txz}}` + +- Compare two packages with colorized output: + +`pkgdiff -c {{path/to/package1.txz}} {{path/to/package2.txz}}` + +- Compare two packages and output a simple unified diff: + +`pkgdiff -a {{path/to/package1.txz}} {{path/to/package2.txz}}` diff --git a/tldr/linux/pkgtool b/tldr/linux/pkgtool new file mode 100644 index 00000000..91a0a165 --- /dev/null +++ b/tldr/linux/pkgtool @@ -0,0 +1,30 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# pkgtool + +> Interactive menu-driven tool for managing Slackware packages. +> See also: `installpkg`, `removepkg`, `upgradepkg`, `makepkg`. +> More information: . + +- Launch the interactive package tool: + +`sudo pkgtool` + +- Remove packages interactively: + +`sudo pkgtool --remove_menu` + +- View installed packages: + +`pkgtool --view_menu` + +- Install packages from the current directory: + +`sudo pkgtool --install_menu` + +- Set up packages interactively (run doinst.sh scripts): + +`sudo pkgtool --setup_menu` diff --git a/tldr/linux/strace b/tldr/linux/strace index d76ba391..5873a62e 100644 --- a/tldr/linux/strace +++ b/tldr/linux/strace @@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # strace > Troubleshooting tool for tracing system calls. +> See also: `fatrace`. > More information: . - Start tracing a specific process by its PID: diff --git a/tldr/linux/unzipsfx b/tldr/linux/unzipsfx index d1fc881c..bae580e8 100644 --- a/tldr/linux/unzipsfx +++ b/tldr/linux/unzipsfx @@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git - Create a self-extracting binary file of a Zip archive: -`cat unzipsfx {{path/to/archive.zip}} > {{filename}} && chmod 755 {{filename}}` +`cat $(which unzipsfx) {{path/to/archive.zip}} > {{filename}} && chmod 755 {{filename}}` - Extract a self-extracting binary in the current directory: diff --git a/tldr/linux/upgradepkg b/tldr/linux/upgradepkg new file mode 100644 index 00000000..360297cb --- /dev/null +++ b/tldr/linux/upgradepkg @@ -0,0 +1,30 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# upgradepkg + +> Upgrade Slackware packages by replacing existing packages with new versions. +> See also: `installpkg`, `removepkg`, `makepkg`, `pkgtool`. +> More information: . + +- Upgrade a package: + +`sudo upgradepkg {{path/to/package.tgz}}` + +- Upgrade a package, installing it if not already present: + +`sudo upgradepkg --install-new {{path/to/package.tgz}}` + +- Reinstall a package (even if the same version is already installed): + +`sudo upgradepkg --reinstall {{path/to/package.tgz}}` + +- Preview what would happen without actually upgrading: + +`upgradepkg --dry-run {{path/to/package.tgz}}` + +- Upgrade a package and show detailed progress: + +`sudo upgradepkg --verbose {{path/to/package.tgz}}` diff --git a/tldr/mariadb b/tldr/mariadb index fbc524ec..4eaa8b3b 100644 --- a/tldr/mariadb +++ b/tldr/mariadb @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # mariadb > The mariadb client tool. -> More information: . +> More information: . - Connect to a specific MariaDB database: @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Connect to a specific MariaDB database using username and password: -`mariadb --user {{user_name}} --password {{your_password}} {{db_name}}` +`mariadb {{[-u|--user]}} {{user_name}} {{[-p|--password]}} {{your_password}} {{db_name}}` - Show warnings after every statement in interactive and batch mode: diff --git a/tldr/podman-export b/tldr/podman-export new file mode 100644 index 00000000..63fc5244 --- /dev/null +++ b/tldr/podman-export @@ -0,0 +1,18 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# podman export + +> Export the filesystem of a container and save it as a tarball on the local machine. +> See also: `podman import`, `podman save`. +> More information: . + +- Export a container's filesystem to a tar file: + +`podman export {{[-o|--output]}} {{path/to/file.tar}} {{container_name_or_id}}` + +- Export a container's filesystem to `stdout`: + +`podman export {{container_name_or_id}} > {{path/to/file.tar}}` diff --git a/tldr/podman-image-load b/tldr/podman-image-load new file mode 100644 index 00000000..965f51d7 --- /dev/null +++ b/tldr/podman-image-load @@ -0,0 +1,12 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# podman image load + +> This command is an alias of `podman load`. + +- View documentation for the original command: + +`tldr podman load` diff --git a/tldr/podman-import b/tldr/podman-import new file mode 100644 index 00000000..71f56b0a --- /dev/null +++ b/tldr/podman-import @@ -0,0 +1,26 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# podman import + +> Import a tarball and save it as a filesystem image. +> See also: `podman export`, `podman save`. +> More information: . + +- Import a tarball from a local file and create an image: + +`podman import {{path/to/tarball.tar}} {{image:tag}}` + +- Import a tarball from a URL: + +`podman import {{https://example.com/image.tar}} {{image:tag}}` + +- Import a tarball and add a commit message: + +`podman import {{[-m|--message]}} "{{commit_message}}" {{path/to/tarball.tar}} {{image:tag}}` + +- Import a tarball and set a default command (required for running the container): + +`podman import {{[-c|--change]}} CMD={{/bin/bash}} {{path/to/tarball.tar}} {{image:tag}}` diff --git a/tldr/podman-load b/tldr/podman-load new file mode 100644 index 00000000..37d69450 --- /dev/null +++ b/tldr/podman-load @@ -0,0 +1,26 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# podman load + +> Load an image from an oci-archive or a docker-archive created using podman save. +> See also: `podman save`, `podman import`. +> More information: . + +- Load an image from a tar file: + +`podman load {{[-i|--input]}} {{path/to/file.tar}}` + +- Load an image from a compressed tar file: + +`podman load {{[-i|--input]}} {{path/to/file.tar[.gz|.bz2|.xz|.zst]}}` + +- Load an image and display quiet output (only show the image ID): + +`podman load {{[-q|--quiet]}} {{[-i|--input]}} {{path/to/file.tar}}` + +- Load an image from `stdin`: + +`podman < {{path/to/file.tar}} load` diff --git a/tldr/podman-save b/tldr/podman-save new file mode 100644 index 00000000..28258a3b --- /dev/null +++ b/tldr/podman-save @@ -0,0 +1,26 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# podman save + +> Save an image to a local file or directory. +> See also: `podman load`, `podman export`. +> More information: . + +- Save an image to a tar file: + +`podman save {{[-o|--output]}} {{path/to/file.tar}} {{image:tag}}` + +- Save an image to `stdout`: + +`podman save {{image:tag}} > {{path/to/file.tar}}` + +- Save an image with compression: + +`podman save {{image:tag}} | {{[gzip|bzip2|xz|zstd|zstdchunked]}} > {{path/to/file.tar[.gz|.bz2|.xz|.zst|.zst]}}` + +- Transfer an image to remote system with on-the-fly compression and progress bar: + +`podman save {{image:tag}} | zstd {{[-T|--threads]}} 0 --ultra | pv | ssh {{username}}@{{remote_host}} podman load` diff --git a/tldr/return b/tldr/return index 0feb4ef7..ea845318 100644 --- a/tldr/return +++ b/tldr/return @@ -5,7 +5,9 @@ source: https://github.com/tldr-pages/tldr.git --- # return -> Exit a function or a script if run with `source`. +> Exit a function. +> Can exit out of a script if run with `source`. +> See also: `exit`. > More information: . - Exit a function prematurely: diff --git a/tldr/shopt b/tldr/shopt index 6ea40bbf..8a59e295 100644 --- a/tldr/shopt +++ b/tldr/shopt @@ -9,7 +9,7 @@ source: https://github.com/tldr-pages/tldr.git > Generic POSIX shell variables (stored in `$SHELLOPTS`) are managed with the `set` command instead. > More information: . -- List of all settable options and whether they are set: +- List of all setable options and whether they are set: `shopt` diff --git a/tldr/time b/tldr/time index 279cedd0..fc687a94 100644 --- a/tldr/time +++ b/tldr/time @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # time > Measure how long a command took to run. -> Note: `time` can either exist as a shell builtin, a standalone program or both. +> Note: `time` can either exist as a shell builtin, a standalone program, or both. > See also: `times`. > More information: . diff --git a/tldr/times b/tldr/times index 1e1f7c25..b8c6147f 100644 --- a/tldr/times +++ b/tldr/times @@ -6,9 +6,10 @@ source: https://github.com/tldr-pages/tldr.git # times > Print the cumulative CPU usage time of the current shell. +> First line is current shell CPU usage for User and System. Second is all child processes. > See also: `time`. > More information: . -- Print CPU usage. First line is current shell CPU usage for User and System. Second is all child processes: +- Print CPU usage: `times` diff --git a/tldr/true b/tldr/true index a9137b5f..407acf4b 100644 --- a/tldr/true +++ b/tldr/true @@ -6,9 +6,13 @@ source: https://github.com/tldr-pages/tldr.git # true > Returns a successful exit status code of 0. -> Use this with the || operator to make a command always exit with 0. -> More information: . +> See also: `false`. +> More information: . - Return a successful exit code: `true` + +- Make a command always exit with 0: + +`{{command}} || true` diff --git a/tldr/ulimit b/tldr/ulimit index d80c0f34..e97427bb 100644 --- a/tldr/ulimit +++ b/tldr/ulimit @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # ulimit > Get and set resource limits for user processes. -> It is a shell builtin hence not shell-agnostic. +> This is a shell builtin hence not shell-agnostic. > More information: . - Get the properties of all the user limits: diff --git a/tldr/unset b/tldr/unset index 5535a261..3127fdc4 100644 --- a/tldr/unset +++ b/tldr/unset @@ -8,14 +8,14 @@ source: https://github.com/tldr-pages/tldr.git > Remove shell variables or functions. > More information: . -- Remove the variable `foo`, or if the variable doesn't exist, remove the function `foo`: +- Remove variable, or if the variable doesn't exist, remove the function of the same name: -`unset {{foo}}` +`unset {{variable}}` -- Remove the variables foo and bar: +- Remove variables: -`unset -v {{foo}} {{bar}}` +`unset -v {{variable1 variable2 ...}}` -- Remove the function my_func: +- Remove the function: -`unset -f {{my_func}}` +`unset -f {{function_name1 function_name2}}` diff --git a/tldr/usql b/tldr/usql index a8b9cf59..cb36d9fc 100644 --- a/tldr/usql +++ b/tldr/usql @@ -14,11 +14,11 @@ source: https://github.com/tldr-pages/tldr.git - Execute commands from a file: -`usql --file={{path/to/query.sql}}` +`usql {{[-f|--file]}} {{path/to/query.sql}}` - Execute a specific SQL command: -`usql --command="{{sql_command}}"` +`usql {{[-c|--command]}} "{{sql_command}}"` - Run an SQL command in the `usql` prompt: diff --git a/tldr/xml b/tldr/xml index 9cac3b6b..21a8b254 100644 --- a/tldr/xml +++ b/tldr/xml @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # xml > XMLStarlet Toolkit: query, edit, check, convert, and transform XML documents. -> Some subcommands such as `xml validate` have their own usage documentation. +> Some subcommands such as `validate` have their own usage documentation. > More information: . - Display general help, including the list of subcommands: