From 76321127ee631a98fc3c83d713b3f260cf86a60f Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Sat, 3 Aug 2024 00:14:57 +0000 Subject: [PATCH] Update cheatsheets --- tldr/aws-accessanalyzer | 41 +++++++++++++++++++++++++++++++++++++++++ tldr/ping | 4 ++++ tldr/xargs | 4 ++++ 3 files changed, 49 insertions(+) create mode 100644 tldr/aws-accessanalyzer diff --git a/tldr/aws-accessanalyzer b/tldr/aws-accessanalyzer new file mode 100644 index 00000000..a229e27b --- /dev/null +++ b/tldr/aws-accessanalyzer @@ -0,0 +1,41 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# aws accessanalyzer + +> Analyze and review resource policies to identify potential security risks. +> More information: . + +- Create a new Access Analyzer: + +`aws accessanalyzer create-analyzer --analyzer-name {{analyzer_name}} --type {{type}} --tags {{tags}}` + +- Delete an existing Access Analyzer: + +`aws accessanalyzer delete-analyzer --analyzer-arn {{analyzer_arn}}` + +- Get details of a specific Access Analyzer: + +`aws accessanalyzer get-analyzer --analyzer-arn {{analyzer_arn}}` + +- List all Access Analyzers: + +`aws accessanalyzer list-analyzers` + +- Update settings of an Access Analyzer: + +`aws accessanalyzer update-analyzer --analyzer-arn {{analyzer_arn}} --tags {{new_tags}}` + +- Create a new Access Analyzer archive rule: + +`aws accessanalyzer create-archive-rule --analyzer-arn {{analyzer_arn}} --rule-name {{rule_name}} --filter {{filter}}` + +- Delete an Access Analyzer archive rule: + +`aws accessanalyzer delete-archive-rule --analyzer-arn {{analyzer_arn}} --rule-name {{rule_name}}` + +- List all Access Analyzer archive rules: + +`aws accessanalyzer list-archive-rules --analyzer-arn {{analyzer_arn}}` diff --git a/tldr/ping b/tldr/ping index b96061e9..3d65b203 100644 --- a/tldr/ping +++ b/tldr/ping @@ -31,3 +31,7 @@ source: https://github.com/tldr-pages/tldr.git - Also display a message if no response was received: `ping -O {{host}}` + +- Ping a host with specific number of pings, timeout (`-W`) for each reply, and total time limit (`-w`) of the entire ping run: + +`ping -c {{count}} -W {{seconds}} -w {{seconds}} {{host}}` diff --git a/tldr/xargs b/tldr/xargs index 948a1bef..1b1d7ed8 100644 --- a/tldr/xargs +++ b/tldr/xargs @@ -21,6 +21,10 @@ source: https://github.com/tldr-pages/tldr.git `find . -name '*.backup' -print0 | xargs -0 rm -v` +- Execute the command once per argument: + +`{{arguments_source}} | xargs -n1 {{command}}` + - Execute the command once for each input line, replacing any occurrences of the placeholder (here marked as `_`) with the input line: `{{arguments_source}} | xargs -I _ {{command}} _ {{optional_extra_arguments}}`