diff --git a/tldr/chkrootkit b/tldr/chkrootkit new file mode 100644 index 00000000..1acc575f --- /dev/null +++ b/tldr/chkrootkit @@ -0,0 +1,41 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# chkrootkit + +> Scan system for rootkits. +> More information: . + +- 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` diff --git a/tldr/fastapi b/tldr/fastapi new file mode 100644 index 00000000..1355e03a --- /dev/null +++ b/tldr/fastapi @@ -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: . + +- 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` diff --git a/tldr/freeramdisk b/tldr/freeramdisk new file mode 100644 index 00000000..439fb71e --- /dev/null +++ b/tldr/freeramdisk @@ -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: . + +- Free `loadlin` ramdisk memory: + +`sudo freeramdisk` diff --git a/tldr/hexdump b/tldr/hexdump index c0a762e9..436fa585 100644 --- a/tldr/hexdump +++ b/tldr/hexdump @@ -5,10 +5,11 @@ source: https://github.com/tldr-pages/tldr.git --- # hexdump -> An ASCII, decimal, hexadecimal, octal dump. -> More information: . +> Display file contents in hexadecimal, decimal, octal, or ASCII. +> Useful for inspecting dump file, binary data, or debug output. +> More information: . -- 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}}` diff --git a/tldr/linux/fancontrol b/tldr/linux/fancontrol new file mode 100644 index 00000000..d4b3e63d --- /dev/null +++ b/tldr/linux/fancontrol @@ -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: . + +- Start `fancontrol` using default `/etc/fancontrol` configuration file: + +`fancontrol` + +- Start `fancontrol` using custom configuration file path: + +`fancontrol {{path/to/config_file}}` diff --git a/tldr/linux/lsdev b/tldr/linux/lsdev new file mode 100644 index 00000000..dc3b3216 --- /dev/null +++ b/tldr/linux/lsdev @@ -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: . + +- Show list of installed hardware: + +`lsdev` diff --git a/tldr/stress-ng b/tldr/stress-ng new file mode 100644 index 00000000..2534f7c0 --- /dev/null +++ b/tldr/stress-ng @@ -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: . + +- 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` diff --git a/tldr/subl b/tldr/subl index 3eafa7ef..6af328c4 100644 --- a/tldr/subl +++ b/tldr/subl @@ -6,11 +6,11 @@ source: https://github.com/tldr-pages/tldr.git # subl > Sublime Text editor. -> More information: . +> More information: . - 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}}`