mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-05 22:44:37 +00:00
Update cheatsheets
This commit is contained in:
35
tldr/linux/agetty
Normal file
35
tldr/linux/agetty
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# agetty
|
||||
|
||||
> Alternative `getty`: Open a `tty` port, prompt for a login name, and invoke the `/bin/login` command.
|
||||
> It is normally invoked by `init`.
|
||||
> Note: the baud rate is the speed of data transfer between a terminal and a device over a serial connection.
|
||||
> More information: <https://manned.org/agetty>.
|
||||
|
||||
- Connect `stdin` to a port (relative to `/dev`) and optionally specify a baud rate (defaults to 9600):
|
||||
|
||||
`agetty {{tty}} {{115200}}`
|
||||
|
||||
- Assume `stdin` is already connected to a `tty` and set a [t]imeout for the login:
|
||||
|
||||
`agetty {{-t|--timeout}} {{timeout_in_seconds}} -`
|
||||
|
||||
- Assume the `tty` is [8]-bit, overriding the `TERM` environment variable set by `init`:
|
||||
|
||||
`agetty -8 - {{term_var}}`
|
||||
|
||||
- Skip the login ([n]o login) and invoke, as root, another [l]ogin program instead of `/bin/login`:
|
||||
|
||||
`agetty {{n|--skip-login}} {{-l|--login-program}} {{login_program}} {{tty}}`
|
||||
|
||||
- Do not display the pre-login ([i]ssue) file (`/etc/issue` by default) before writing the login prompt:
|
||||
|
||||
`agetty {{-i|--noissue}} -`
|
||||
|
||||
- Change the [r]oot directory and write a specific fake [H]ost into the `utmp` file:
|
||||
|
||||
`agetty {{-r|--chroot}} {{/path/to/root_directory}} {{-H|--host}} {{fake_host}} -`
|
||||
@@ -5,17 +5,21 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# zipsplit
|
||||
|
||||
> Read a zipfile and split it into smaller zipfiles.
|
||||
> Split a Zip archive into smaller Zip archives.
|
||||
> More information: <https://manned.org/zipsplit>.
|
||||
|
||||
- Split zipfile into pieces that are no larger than a particular size [n]:
|
||||
- Split Zip archive into parts that are no larger than 36000 bytes (36 MB):
|
||||
|
||||
`zipsplit {{path/to/archive.zip}}`
|
||||
|
||||
- Use a given [n]umber of bytes as the part limit:
|
||||
|
||||
`zipsplit -n {{size}} {{path/to/archive.zip}}`
|
||||
|
||||
- [p]ause between the creation of each split zipfile:
|
||||
- [p]ause between the creation of each part:
|
||||
|
||||
`zipsplit -p -n {{size}} {{path/to/archive.zip}}`
|
||||
|
||||
- Output the split zipfiles into the `archive` directory:
|
||||
- Output the smaller Zip archives into a given directory:
|
||||
|
||||
`zipsplit -b {{archive}} -n {{size}} {{path/to/archive.zip}}`
|
||||
`zipsplit -b {{path/to/output_directory}} -n {{size}} {{path/to/archive.zip}}`
|
||||
|
||||
22
tldr/pamfix
Normal file
22
tldr/pamfix
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# pamfix
|
||||
|
||||
> Fix errors in PAM, PBM, PGM and PPM files.
|
||||
> See also: `pamfile`, `pamvalidate`.
|
||||
> More information: <https://netpbm.sourceforge.net/doc/pamfix.html>.
|
||||
|
||||
- Fix a Netpbm file that is missing its last part:
|
||||
|
||||
`pamfix -truncate {{path/to/corrupted.ext} > {{path/to/output.ext}}`
|
||||
|
||||
- Fix a Netpbm file where pixel values exceed the image's `maxval` by lowering the offending pixels' values:
|
||||
|
||||
`pamfix -clip {{path/to/corrupted.ext}} > {{path/to/output.ext}}`
|
||||
|
||||
- Fix a Netpbm file where pixel values exceed the image's maxval by increasing it:
|
||||
|
||||
`pamfix -changemaxval {{path/to/corrupted.pam|pbm|pgm|ppm}} > {{path/to/output.pam|pbm|pgm|ppm}}`
|
||||
13
tldr/pamfixtrunc
Normal file
13
tldr/pamfixtrunc
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# pamfixtrunc
|
||||
|
||||
> This command is superseded by `pamfix -truncate`.
|
||||
> More information: <https://netpbm.sourceforge.net/doc/pamfixtrunc.html>.
|
||||
|
||||
- View documentation for the current command:
|
||||
|
||||
`tldr pamfix`
|
||||
14
tldr/pamvalidate
Normal file
14
tldr/pamvalidate
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# pamvalidate
|
||||
|
||||
> Validate PAM, PGM, PBM and PPM files.
|
||||
> See also: `pamfile`, `pamfix`.
|
||||
> More information: <https://netpbm.sourceforge.net/doc/pamvalidate.html>.
|
||||
|
||||
- Copy a Netpbm file from `stdin` to `stdout` if and only if it valid; fail otherwise:
|
||||
|
||||
`{{command}} | pamvalidate > {{path/to/output.ext}}`
|
||||
21
tldr/zipcloak
Normal file
21
tldr/zipcloak
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# zipcloak
|
||||
|
||||
> Encrypt the contents within a Zip archive.
|
||||
> More information: <https://manned.org/zipcloak>.
|
||||
|
||||
- Encrypt the contents of a Zip archive:
|
||||
|
||||
`zipcloak {{path/to/archive.zip}}`
|
||||
|
||||
- [d]ecrypt the contents of a Zip archive:
|
||||
|
||||
`zipcloak -d {{path/to/archive.zip}}`
|
||||
|
||||
- [O]utput the encrypted contents into a new Zip archive:
|
||||
|
||||
`zipcloak {{path/to/archive.zip}} -O {{path/to/encrypted.zip}}`
|
||||
Reference in New Issue
Block a user