Update cheatsheets

This commit is contained in:
ivuorinen
2025-12-12 00:21:51 +00:00
parent f3773777cf
commit 2c1898f6e4
71 changed files with 121 additions and 92 deletions

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# xargs
> Execute a command with piped arguments coming from another command, a file, etc.
> The input is treated as a single block of text and split into separate pieces on spaces, tabs, newlines and end-of-file.
> The input is treated as a single block of text and split into separate pieces on spaces, tabs, newlines, and end-of-file.
> More information: <https://www.gnu.org/software/findutils/manual/html_mono/find.html#Invoking-xargs>.
- Run a command using the input data as arguments:
@@ -17,7 +17,7 @@ source: https://github.com/tldr-pages/tldr.git
`{{arguments_source}} | xargs sh -c "{{command1}} && {{command2}} | {{command3}}"`
- Gzip all files with `.log` extension taking advantage of multiple threads (`-print0` uses a null character to split file names, and `-0` uses it as delimiter):
- Gzip all files with `.log` extension taking advantage of multiple threads (`-print0` uses a null character to split file names and `--null` uses it as delimiter):
`find . -name '*.log' -print0 | xargs {{[-0|--null]}} {{[-P|--max-procs]}} {{4}} {{[-n|--max-args]}} 1 gzip`