mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-07 11:45:37 +00:00
Update cheatsheets
This commit is contained in:
41
tldr/chkrootkit
Normal file
41
tldr/chkrootkit
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# chkrootkit
|
||||
|
||||
> Scan system for rootkits.
|
||||
> More information: <https://manned.org/chkrootkit>.
|
||||
|
||||
- Enable [q]uiet mode and suppress normal test results:
|
||||
|
||||
`chkrootkit -q`
|
||||
|
||||
- Enable e[x]pert mode and produce additional outputs:
|
||||
|
||||
`chkrootkit -x`
|
||||
|
||||
- Enable [d]ebug mode to show all output:
|
||||
|
||||
`chkrootkit -d`
|
||||
|
||||
- Specify [e]xcluded files for some tests:
|
||||
|
||||
`chkrootkit -e "{{path/to/file}}"`
|
||||
|
||||
- Specify a directory as the [r]oot for testing (e.g. mounted `ext` drives):
|
||||
|
||||
`chkrootkit -r {{path/to/directory}}`
|
||||
|
||||
- Ignore [n]fs-mounted directories:
|
||||
|
||||
`chkrootkit -n`
|
||||
|
||||
- Invoke [T]ests and ignore specific filesystem types:
|
||||
|
||||
`chkrootkit -T {{filesystemtype}}`
|
||||
|
||||
- Generate [l]ist of available tests:
|
||||
|
||||
`chkrootkit -l`
|
||||
33
tldr/fastapi
Normal file
33
tldr/fastapi
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# fastapi
|
||||
|
||||
> Run FastAPI apps which uses Uvicorn under the hood.
|
||||
> More information: <https://manned.org/fastapi>.
|
||||
|
||||
- Run a FastAPI app with automatic reload (for development):
|
||||
|
||||
`fastapi run {{path/to/file.py}} --reload`
|
||||
|
||||
- Serve your app in both development mode:
|
||||
|
||||
`fastapi dev {{path/to/file.py}}`
|
||||
|
||||
- Specify the host and port to run on:
|
||||
|
||||
`fastapi run {{path/to/file.py}} --host {{host_address}} --port {{port}}`
|
||||
|
||||
- Set the app variable name (if not `app`) or specify a custom app directory:
|
||||
|
||||
`fastapi run {{path/to/file.py}} --app-dir {{path/to/app}} --app {{custom_app_name}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`fastapi --help`
|
||||
|
||||
- Display help for a subcommand:
|
||||
|
||||
`fastapi {{subcommand}} --help`
|
||||
14
tldr/freeramdisk
Normal file
14
tldr/freeramdisk
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# freeramdisk
|
||||
|
||||
> Free memory used by `loadlin` ramdisk on legacy systems.
|
||||
> Largely deprecated by `umount`, `losetup`, and `tmpfs`.
|
||||
> More information: <https://manned.org/freeramdisk>.
|
||||
|
||||
- Free `loadlin` ramdisk memory:
|
||||
|
||||
`sudo freeramdisk`
|
||||
19
tldr/hexdump
19
tldr/hexdump
@@ -5,10 +5,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# hexdump
|
||||
|
||||
> An ASCII, decimal, hexadecimal, octal dump.
|
||||
> More information: <https://manned.org/hexdump>.
|
||||
> Display file contents in hexadecimal, decimal, octal, or ASCII.
|
||||
> Useful for inspecting dump file, binary data, or debug output.
|
||||
> More information: <https://manned.org/man/freebsd/hexdump.1>.
|
||||
|
||||
- Print the hexadecimal representation of a file, replacing duplicate lines by '*':
|
||||
- Print the hexadecimal representation of a file, replacing duplicate lines by `*`:
|
||||
|
||||
`hexdump {{path/to/file}}`
|
||||
|
||||
@@ -16,10 +17,14 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`hexdump -C {{path/to/file}}`
|
||||
|
||||
- Display the hexadecimal representation of a file, but interpret only n bytes of the input:
|
||||
- Display the hexadecimal representation of a file, but interpret only a specific number of bytes of the input:
|
||||
|
||||
`hexdump -C -n{{number_of_bytes}} {{path/to/file}}`
|
||||
`hexdump -C -n {{number_of_bytes}} {{path/to/file}}`
|
||||
|
||||
- Don't replace duplicate lines with '*':
|
||||
- Verbose - no suppression by `*` on duplicate lines:
|
||||
|
||||
`hexdump --no-squeezing {{path/to/file}}`
|
||||
`hexdump -v {{path/to/file}}`
|
||||
|
||||
- Format output using printf-like format string:
|
||||
|
||||
`hexdump -e '{{element_format .. end_format}}' {{path/to/file}}`
|
||||
|
||||
18
tldr/linux/fancontrol
Normal file
18
tldr/linux/fancontrol
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# fancontrol
|
||||
|
||||
> Automated fan speed management.
|
||||
> Uses a configuration file to control a wide range of variables.
|
||||
> More information: <https://manned.org/fancontrol>.
|
||||
|
||||
- Start `fancontrol` using default `/etc/fancontrol` configuration file:
|
||||
|
||||
`fancontrol`
|
||||
|
||||
- Start `fancontrol` using custom configuration file path:
|
||||
|
||||
`fancontrol {{path/to/config_file}}`
|
||||
13
tldr/linux/lsdev
Normal file
13
tldr/linux/lsdev
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# lsdev
|
||||
|
||||
> Display installed hardware detected in the `/proc` director.
|
||||
> More information: <https://manned.org/lsdev>.
|
||||
|
||||
- Show list of installed hardware:
|
||||
|
||||
`lsdev`
|
||||
26
tldr/stress-ng
Normal file
26
tldr/stress-ng
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# stress-ng
|
||||
|
||||
> Load and stress a Linux system in various ways (CPU, memory, I/O, etc.).
|
||||
> Useful for benchmarking, hardware validation, and stability testing.
|
||||
> More information: <https://manned.org/stress-ng>.
|
||||
|
||||
- Stress all CPUs with 4 workers for 60 seconds:
|
||||
|
||||
`stress-ng {{[-c|--cpu]}} 4 {{[-t|--timeout]}} 60s`
|
||||
|
||||
- Stress virtual memory with 2 workers for 30 seconds:
|
||||
|
||||
`stress-ng {{[-m|--vm]}} 2 --vm-bytes {{512M}} {{[-t|--timeout]}} 30s`
|
||||
|
||||
- Stress the I/O subsystem with 3 workers for 45 seconds:
|
||||
|
||||
`stress-ng {{[-i|--io]}} 3 {{[-t|--timeout]}} 45s`
|
||||
|
||||
- Run all stress tests for 2 minutes:
|
||||
|
||||
`stress-ng {{[-a|--all]}} {{1}} {{[-t|--timeout]}} 2m`
|
||||
@@ -6,11 +6,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# subl
|
||||
|
||||
> Sublime Text editor.
|
||||
> More information: <https://www.sublimetext.com>.
|
||||
> More information: <https://www.sublimetext.com/docs/command_line.html>.
|
||||
|
||||
- Open the current directory in Sublime Text:
|
||||
|
||||
`subl {{.}}`
|
||||
`subl .`
|
||||
|
||||
- Open a file or directory in Sublime Text:
|
||||
|
||||
@@ -22,8 +22,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Open a file or directory in the currently open window:
|
||||
|
||||
`subl -a {{path/to/file}}`
|
||||
`subl {{[-a|--add]}} {{path/to/file_or_directory}}`
|
||||
|
||||
- Open a file or directory in a new window:
|
||||
|
||||
`subl -n {{path/to/file}}`
|
||||
`subl {{[-n|--new-window]}} {{path/to/file_or_directory}}`
|
||||
|
||||
Reference in New Issue
Block a user