mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-04 21:44:00 +00:00
Update cheatsheets
This commit is contained in:
12
tldr/]
Normal file
12
tldr/]
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# ]
|
||||
|
||||
> This shell keyword is used to close out `[`.
|
||||
|
||||
- View documentation for the `[` keyword:
|
||||
|
||||
`tldr [`
|
||||
12
tldr/]]
Normal file
12
tldr/]]
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# ]]
|
||||
|
||||
> This shell keyword is used to close out `[[`.
|
||||
|
||||
- View documentation for the `[[` keyword:
|
||||
|
||||
`tldr [[`
|
||||
24
tldr/do
Normal file
24
tldr/do
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# do
|
||||
|
||||
> This shell keyword is used with `for`, `while`, `select`, and `until` to mark the start of a loop.
|
||||
|
||||
- View documentation for the `for` keyword:
|
||||
|
||||
`tldr for`
|
||||
|
||||
- View documentation for the `while` keyword:
|
||||
|
||||
`tldr while`
|
||||
|
||||
- View documentation for the `select` keyword:
|
||||
|
||||
`tldr select`
|
||||
|
||||
- View documentation for the `until` keyword:
|
||||
|
||||
`tldr until`
|
||||
24
tldr/done
Normal file
24
tldr/done
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# done
|
||||
|
||||
> This shell keyword is used with `for`, `while`, `select`, and `until` to mark the end of a loop.
|
||||
|
||||
- View documentation for the `for` keyword:
|
||||
|
||||
`tldr for`
|
||||
|
||||
- View documentation for the `while` keyword:
|
||||
|
||||
`tldr while`
|
||||
|
||||
- View documentation for the `select` keyword:
|
||||
|
||||
`tldr select`
|
||||
|
||||
- View documentation for the `until` keyword:
|
||||
|
||||
`tldr until`
|
||||
2
tldr/ed
2
tldr/ed
@@ -37,6 +37,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`,s/{{regular_expression}}/{{replacement}}/g<Enter>`
|
||||
|
||||
- Exit ed:
|
||||
- Exit `ed`:
|
||||
|
||||
`q<Enter>`
|
||||
|
||||
12
tldr/elif
Normal file
12
tldr/elif
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# elif
|
||||
|
||||
> This shell keyword is used in combination with `if` and `else` to define a code branch.
|
||||
|
||||
- View documentation for `if` command:
|
||||
|
||||
`tldr if`
|
||||
12
tldr/else
Normal file
12
tldr/else
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# else
|
||||
|
||||
> This shell keyword is used in combination with `if` and `elif` to define a code branch if no other branch was valid.
|
||||
|
||||
- View documentation for the `if` keyword:
|
||||
|
||||
`tldr if`
|
||||
12
tldr/esac
Normal file
12
tldr/esac
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# esac
|
||||
|
||||
> This shell keyword is used to end a `case` statement.
|
||||
|
||||
- View documentation for the `case` keyword:
|
||||
|
||||
`tldr case`
|
||||
12
tldr/fi
Normal file
12
tldr/fi
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# fi
|
||||
|
||||
> This shell keyword is used to end an `if` statement.
|
||||
|
||||
- View documentation for the `if` keyword:
|
||||
|
||||
`tldr if`
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# firefox
|
||||
|
||||
> A free and open source web browser.
|
||||
> More information: <https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options>.
|
||||
> More information: <https://wiki.mozilla.org/Firefox/CommandLineOptions>.
|
||||
|
||||
- Launch Firefox and open a web page:
|
||||
|
||||
|
||||
12
tldr/in
Normal file
12
tldr/in
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# in
|
||||
|
||||
> This shell keyword is used with `for` to separate the iterator and items to iterate.
|
||||
|
||||
- View documentation for the `for` keyword:
|
||||
|
||||
`tldr for`
|
||||
@@ -6,9 +6,13 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# apk
|
||||
|
||||
> Alpine Linux package management tool.
|
||||
> More information: <https://manned.org/apk>.
|
||||
> More information: <https://wiki.alpinelinux.org/wiki/Alpine_Package_Keeper>.
|
||||
|
||||
- Update repository indexes from all remote repositories:
|
||||
- Update repository indexes and upgrade all packages:
|
||||
|
||||
`apk upgrade {{[-U|--update-cache]}}`
|
||||
|
||||
- Only update repository indexes:
|
||||
|
||||
`apk update`
|
||||
|
||||
@@ -20,13 +24,17 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`apk del {{package}}`
|
||||
|
||||
- Repair a package or upgrade it without modifying main dependencies:
|
||||
- Repair/Reinstall a package without modifying main dependencies:
|
||||
|
||||
`apk fix {{package}}`
|
||||
|
||||
- Search for a package via keywords:
|
||||
- Search for packages with a keyword in their name and list results with descriptions:
|
||||
|
||||
`apk search {{keywords}}`
|
||||
`apk search {{[-v|--verbose]}} {{keyword}}`
|
||||
|
||||
- Search for packages with a keyword in their description:
|
||||
|
||||
`apk search {{[-d|--description]}} {{keyword}}`
|
||||
|
||||
- Display information about a specific package:
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- List available shells:
|
||||
|
||||
`chsl {{[-l|--list-shells]}}`
|
||||
`chsh {{[-l|--list-shells]}}`
|
||||
|
||||
- Set a specific login shell for the current user:
|
||||
|
||||
|
||||
@@ -15,4 +15,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Change to a specific runlevel, but don't stop any existing services:
|
||||
|
||||
`sudo openrc --no-stop {{runlevel_name}}`
|
||||
`sudo openrc {{[-n|--no-stop]}} {{runlevel_name}}`
|
||||
|
||||
@@ -27,7 +27,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Simulate running a service's custom command:
|
||||
|
||||
`sudo rc-service --dry-run {{service_name}} {{command_name}}`
|
||||
`sudo rc-service {{[-Z|--dry-run]}} {{service_name}} {{command_name}}`
|
||||
|
||||
- Actually run a service's custom command:
|
||||
|
||||
@@ -35,4 +35,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Resolve the location of a service definition on disk:
|
||||
|
||||
`sudo rc-service --resolve {{service_name}}`
|
||||
`sudo rc-service {{[-r|--resolve]}} {{service_name}}`
|
||||
|
||||
@@ -15,24 +15,24 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Include services in all runlevels in the summary:
|
||||
|
||||
`rc-status --all`
|
||||
`rc-status {{[-a|--all]}}`
|
||||
|
||||
- List services that have crashed:
|
||||
|
||||
`rc-status --crashed`
|
||||
`rc-status {{[-c|--crashed]}}`
|
||||
|
||||
- List manually started services:
|
||||
|
||||
`rc-status --manual`
|
||||
`rc-status {{[-m|--manual]}}`
|
||||
|
||||
- List supervised services:
|
||||
|
||||
`rc-status --supervised`
|
||||
`rc-status {{[-S|--supervised]}}`
|
||||
|
||||
- Get the current runlevel:
|
||||
- Display the current runlevel:
|
||||
|
||||
`rc-status --runlevel`
|
||||
`rc-status {{[-r|--runlevel]}}`
|
||||
|
||||
- List all runlevels:
|
||||
|
||||
`rc-status --list`
|
||||
`rc-status {{[-l|--list]}}`
|
||||
|
||||
@@ -9,9 +9,13 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> See also `openrc`.
|
||||
> More information: <https://manned.org/rc-update>.
|
||||
|
||||
- List all services and the runlevels they are added to:
|
||||
- List enabled services and the runlevels they are added to:
|
||||
|
||||
`rc-update show`
|
||||
`rc-update`
|
||||
|
||||
- List all services:
|
||||
|
||||
`rc-update {{[-v|--verbose]}}`
|
||||
|
||||
- Add a service to a runlevel:
|
||||
|
||||
@@ -19,8 +23,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Delete a service from a runlevel:
|
||||
|
||||
`sudo rc-update delete {{service_name}} {{runlevel}}`
|
||||
`sudo rc-update {{[del|delete]}} {{service_name}} {{runlevel}}`
|
||||
|
||||
- Delete a service from all runlevels:
|
||||
|
||||
`sudo rc-update --all delete {{service_name}}`
|
||||
`sudo rc-update {{[-a|--all]}} {{[del|delete]}} {{service_name}}`
|
||||
|
||||
10
tldr/patator
10
tldr/patator
@@ -10,12 +10,20 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Brute force ssh login with rate limit and timeout options (successful login will show login banner or something similar):
|
||||
|
||||
`patator ssh_login host={{ip_or_host}} user=FILE0 0={{path/to/users.txt}} password=FILE1 1={{path/to/passwords.txt}} --rate_limit={{seconds}} --timeout={{seconds}}`
|
||||
`patator ssh_login host={{ip_or_host}} user=FILE0 password=FILE1 0={{path/to/users.txt}} 1={{path/to/passwords.txt}} --rate_limit={{seconds}} --timeout={{seconds}} -x ignore:mesg='Authentication failed.'`
|
||||
|
||||
- Brute force encrypted zip file:
|
||||
|
||||
`patator unzip_pass zipfile={{path/to/file.zip}} password=FILE0 0={{path/to/passwords.txt}} -x ignore:code!=0`
|
||||
|
||||
- Brute force http basic auth (payload file `userpass.txt` should be in the format `username:password`):
|
||||
|
||||
`patator http_fuzz url={{http://host:port}} auth_type=basic user_pass=COMBO00:COMBO01 0={{path/to/userpass.txt}} -x ignore:code=401`
|
||||
|
||||
- Brute force FTP/FTPS login:
|
||||
|
||||
`patator ftp_login host={{ip_or_host}} user=FILE0 password=FILE1 0={{path/to/users.txt}} 1={{path/to/passwords.txt}} tls={{0|1}} -x ignore:mesg='Login incorrect.' -x ignore,reset,retry:code=500`
|
||||
|
||||
- List all available modules:
|
||||
|
||||
`patator --help`
|
||||
|
||||
12
tldr/then
Normal file
12
tldr/then
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# then
|
||||
|
||||
> This shell keyword is used in combination with `if` and `elif` to separate branches and branch conditions.
|
||||
|
||||
- View documentation for `if` command:
|
||||
|
||||
`tldr if`
|
||||
Reference in New Issue
Block a user