Update cheatsheets

This commit is contained in:
ivuorinen
2024-03-25 00:14:11 +00:00
parent ae71584b37
commit 17655fbe93
6 changed files with 114 additions and 5 deletions

35
tldr/linux/agetty Normal file
View 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}} -`

View File

@@ -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}}`