mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-16 07:49:04 +00:00
Update cheatsheets
This commit is contained in:
@@ -13,10 +13,14 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`chsh`
|
||||
|
||||
- Set a specific login [s]hell for the current user:
|
||||
- List available shells:
|
||||
|
||||
`chsh --shell {{path/to/shell}}`
|
||||
`chsl {{[-l|--list-shells]}}`
|
||||
|
||||
- Set a login [s]hell for a specific user:
|
||||
- Set a specific login shell for the current user:
|
||||
|
||||
`sudo chsh --shell {{path/to/shell}} {{username}}`
|
||||
`chsh {{[-s|--shell]}} {{path/to/shell}}`
|
||||
|
||||
- Set a login shell for a specific user:
|
||||
|
||||
`sudo chsh {{[-s|--shell]}} {{path/to/shell}} {{username}}`
|
||||
|
||||
30
tldr/linux/flex
Normal file
30
tldr/linux/flex
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# flex
|
||||
|
||||
> Lexical analyzer generator.
|
||||
> Given the specification for a lexical analyzer, generates C code implementing it.
|
||||
> More information: <https://manned.org/lex.1>.
|
||||
|
||||
- Generate an analyzer from a Lex file, storing it to the file `lex.yy.c`:
|
||||
|
||||
`flex {{analyzer.l}}`
|
||||
|
||||
- Write analyzer to `stdout`:
|
||||
|
||||
`flex {{[-t|--stdout]}} {{analyzer.l}}`
|
||||
|
||||
- Specify the output file:
|
||||
|
||||
`flex {{analyzer.l}} {{[-o|--outfile]}} {{analyzer.c}}`
|
||||
|
||||
- Generate a batch scanner instead of an interactive scanner:
|
||||
|
||||
`flex {{[-B|--batch]}} {{analyzer.l}}`
|
||||
|
||||
- Compile a C file generated by Lex:
|
||||
|
||||
`cc {{path/to/lex.yy.c}} -o {{executable}}`
|
||||
21
tldr/linux/hollywood
Normal file
21
tldr/linux/hollywood
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# hollywood
|
||||
|
||||
> Fill your console with Hollywood melodrama technobabble.
|
||||
> More information: <https://manned.org/hollywood>.
|
||||
|
||||
- Fill the console:
|
||||
|
||||
`hollywood`
|
||||
|
||||
- Exit `hollywood`:
|
||||
|
||||
`<Ctrl c><Ctrl c>`
|
||||
|
||||
- Display help:
|
||||
|
||||
`hollywood -h`
|
||||
@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Open a new terminal window:
|
||||
|
||||
`<Super Return>`
|
||||
`<Super Enter>`
|
||||
|
||||
- Create a new workspace:
|
||||
|
||||
|
||||
@@ -5,26 +5,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# lex
|
||||
|
||||
> Lexical analyzer generator.
|
||||
> Given the specification for a lexical analyzer, generates C code implementing it.
|
||||
> More information: <https://manned.org/lex.1>.
|
||||
> This command is an alias of `flex`.
|
||||
|
||||
- Generate an analyzer from a Lex file, storing it to the file `lex.yy.c`:
|
||||
- View documentation for the original command:
|
||||
|
||||
`lex {{analyzer.l}}`
|
||||
|
||||
- Write analyzer to `stdout`:
|
||||
|
||||
`lex -{{-stdout|t}} {{analyzer.l}}`
|
||||
|
||||
- Specify the output file:
|
||||
|
||||
`lex {{analyzer.l}} --outfile {{analyzer.c}}`
|
||||
|
||||
- Generate a [B]atch scanner instead of an interactive scanner:
|
||||
|
||||
`lex -B {{analyzer.l}}`
|
||||
|
||||
- Compile a C file generated by Lex:
|
||||
|
||||
`cc {{path/to/lex.yy.c}} --output {{executable}}`
|
||||
`tldr flex`
|
||||
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Check or set a terminal's ability to receive messages from other users, usually from the `write` command.
|
||||
> See also `write`, `talk`.
|
||||
> More information: <https://manned.org/mesg.1>.
|
||||
> More information: <https://manned.org/mesg>.
|
||||
|
||||
- Check terminal's openness to write messages:
|
||||
|
||||
@@ -21,6 +21,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`mesg y`
|
||||
|
||||
- Enable [v]erbose mode, printing a warning if the command is not executed from a terminal:
|
||||
- Enable verbose mode, printing a warning if the command is not executed from a terminal:
|
||||
|
||||
`mesg --verbose`
|
||||
`mesg {{[-v|--verbose]}}`
|
||||
|
||||
@@ -30,4 +30,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Create an empty temporary directory and print its absolute path:
|
||||
|
||||
`mktemp --directory`
|
||||
`mktemp {{[-d|--directory]}}`
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# nl
|
||||
|
||||
> Number lines from a file or from `stdin`.
|
||||
> More information: <https://manned.org/nl.1p>.
|
||||
> More information: <https://manned.org/man/nl>.
|
||||
|
||||
- Number non-blank lines in a file:
|
||||
|
||||
@@ -16,26 +16,26 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`{{command}} | nl -`
|
||||
|
||||
- Number [a]ll [b]ody lines including blank lines or do [n]ot number [b]ody lines:
|
||||
- Number [a]ll body lines including blank lines or do [n]ot number body lines:
|
||||
|
||||
`nl --body-numbering {{a|n}} {{path/to/file}}`
|
||||
`nl {{[-b|--body-numbering]}} {{a|n}} {{path/to/file}}`
|
||||
|
||||
- Number only the [b]ody lines that match a basic regular expression (BRE) [p]attern:
|
||||
- Number only the body lines that match a basic regular expression (BRE) [p]attern:
|
||||
|
||||
`nl --body-numbering p'FooBar[0-9]' {{path/to/file}}`
|
||||
`nl {{[-b|--body-numbering]}} p'FooBar[0-9]' {{path/to/file}}`
|
||||
|
||||
- Use a specific [i]ncrement for line numbering:
|
||||
- Use a specific increment for line numbering:
|
||||
|
||||
`nl --line-increment {{increment}} {{path/to/file}}`
|
||||
`nl {{[-i|--line-increment]}} {{increment}} {{path/to/file}}`
|
||||
|
||||
- Specify the line numbering format to [r]ight or [l]eft justified, keeping leading [z]eros or [n]ot:
|
||||
|
||||
`nl --number-format {{rz|ln|rn}}`
|
||||
`nl {{[-n|--number-format]}} {{rz|ln|rn}}`
|
||||
|
||||
- Specify the line numbering's [w]idth (6 by default):
|
||||
- Specify the line numbering's width (6 by default):
|
||||
|
||||
`nl --number-width {{col_width}} {{path/to/file}}`
|
||||
`nl {{[-w|--number-width]}} {{col_width}} {{path/to/file}}`
|
||||
|
||||
- Use a specific string to [s]eparate the line numbers from the lines (TAB by default):
|
||||
- Use a specific string to separate the line numbers from the lines (TAB by default):
|
||||
|
||||
`nl --number-separator {{separator}} {{path/to/file}}`
|
||||
`nl {{[-s|--number-separator]}} {{separator}} {{path/to/file}}`
|
||||
|
||||
@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Navigate the snake:
|
||||
|
||||
`{{ArrowUp|ArrowDown|ArrowLeft|ArrowRight}}`
|
||||
`{{<ArrowUp>|<ArrowDown>|<ArrowLeft>|<ArrowRight>}}`
|
||||
|
||||
- Pause/unpause the game:
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`yakuake`
|
||||
|
||||
- Toggle Yakuale visibility:
|
||||
- Toggle Yakuake visibility:
|
||||
|
||||
`<F12>`
|
||||
|
||||
@@ -32,6 +32,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`<Ctrl {{)|(}}>`
|
||||
|
||||
- Switch between splist:
|
||||
- Switch between splits:
|
||||
|
||||
`{{<Ctrl Tab>|<Ctrl Shift Tab>}}`
|
||||
|
||||
Reference in New Issue
Block a user