From b8a06e5a645718b6f3082b959d9f91b92a9b4617 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Thu, 8 Aug 2024 00:15:18 +0000 Subject: [PATCH] Update cheatsheets --- tldr/ntfyme | 42 ++++++++++++++++++++++++++++++++++++++++++ tldr/xargs | 4 ++-- 2 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 tldr/ntfyme diff --git a/tldr/ntfyme b/tldr/ntfyme new file mode 100644 index 00000000..ac01466d --- /dev/null +++ b/tldr/ntfyme @@ -0,0 +1,42 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# ntfyme + +> A notification tool to track and notify you about your long-running termination process. +> Send notifications with success/error messages with Gmail, Telegram, and more. +> More information: . + +- Directly run your command: + +`ntfyme exec {{-c|--cmd}} {{command}}` + +- Pipe your command and run: + +`echo {{command}} | ntfyme exec` + +- Run multiple commands by enclosing them in quotes: + +`echo "{{command1; command2; command3}}" | ntfyme exec` + +- Track and terminate the process after prolonged suspension: + +`ntfyme exec {{-t|--track-process}} {{-c|--cmd}} {{command}}` + +- Setup the tool configurations interactively: + +`ntfyme setup` + +- Encrypt your password: + +`ntfyme enc` + +- See the log history: + +`ntfyme log` + +- Open and edit the configuration file: + +`ntfyme config` diff --git a/tldr/xargs b/tldr/xargs index 1b1d7ed8..9485121b 100644 --- a/tldr/xargs +++ b/tldr/xargs @@ -17,9 +17,9 @@ source: https://github.com/tldr-pages/tldr.git `{{arguments_source}} | xargs sh -c "{{command1}} && {{command2}} | {{command3}}"` -- Delete all files with a `.backup` extension (`-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 `-0` uses it as delimiter): -`find . -name '*.backup' -print0 | xargs -0 rm -v` +`find . -name '*.log' -print0 | xargs -0 -P {{4}} -n 1 gzip` - Execute the command once per argument: