diff --git a/tldr/linux/agetty b/tldr/linux/agetty new file mode 100644 index 00000000..deaff3aa --- /dev/null +++ b/tldr/linux/agetty @@ -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: . + +- 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}} -` diff --git a/tldr/linux/zipsplit b/tldr/linux/zipsplit index 9ce52fef..2510214f 100644 --- a/tldr/linux/zipsplit +++ b/tldr/linux/zipsplit @@ -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: . -- 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}}` diff --git a/tldr/pamfix b/tldr/pamfix new file mode 100644 index 00000000..a606c392 --- /dev/null +++ b/tldr/pamfix @@ -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: . + +- 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}}` diff --git a/tldr/pamfixtrunc b/tldr/pamfixtrunc new file mode 100644 index 00000000..be773f6b --- /dev/null +++ b/tldr/pamfixtrunc @@ -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: . + +- View documentation for the current command: + +`tldr pamfix` diff --git a/tldr/pamvalidate b/tldr/pamvalidate new file mode 100644 index 00000000..75bf15c2 --- /dev/null +++ b/tldr/pamvalidate @@ -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: . + +- Copy a Netpbm file from `stdin` to `stdout` if and only if it valid; fail otherwise: + +`{{command}} | pamvalidate > {{path/to/output.ext}}` diff --git a/tldr/zipcloak b/tldr/zipcloak new file mode 100644 index 00000000..006814b4 --- /dev/null +++ b/tldr/zipcloak @@ -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: . + +- 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}}`