From ce27afb6af8a6d70cc960a3ecf2551bd7f6b140c Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Thu, 11 Apr 2024 00:13:54 +0000 Subject: [PATCH] Update cheatsheets --- tldr/difft | 38 ++++++++++++++++++++++++++++++++++++++ tldr/latexmk | 12 ++++++++---- tldr/linux/autorecon | 25 +++++++++++++++++++++++++ tldr/linux/dnf5 | 43 +++++++++++++++++++++++++++++++++++++++++++ tldr/linux/eu-readelf | 17 +++++++++++++++++ 5 files changed, 131 insertions(+), 4 deletions(-) create mode 100644 tldr/difft create mode 100644 tldr/linux/autorecon create mode 100644 tldr/linux/dnf5 create mode 100644 tldr/linux/eu-readelf diff --git a/tldr/difft b/tldr/difft new file mode 100644 index 00000000..ace3c945 --- /dev/null +++ b/tldr/difft @@ -0,0 +1,38 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# difft + +> Compare files or directories based on the syntax of the programming language. +> See also: `delta`, `diff`. +> More information: . + +- Compare two files or directories: + +`difft {{path/to/file_or_directory1}} {{path/to/file_or_directory2}}` + +- Only report the presence of differences between the files: + +`difft --check-only {{path/to/file1}} {{path/to/file2}}` + +- Specify the display mode (default is `side-by-side`): + +`difft --display {{side-by-side|side-by-side-show-both|inline|json}} {{path/to/file1}} {{path/to/file2}}` + +- Ignore comments when comparing: + +`difft --ignore-comments {{path/to/file1}} {{path/to/file2}}` + +- Enable/Disable syntax highlighting of source code (default is `on`): + +`difft --syntax-highlight {{on|off}} {{path/to/file1}} {{path/to/file2}}` + +- Do not output anything at all if there are no differences between files: + +`difft --skip-unchanged {{path/to/file_or_directory1}} {{path/to/file_or_directory2}}` + +- Print all programming languages supported by the tool, along with their extensions: + +`difft --list-languages` diff --git a/tldr/latexmk b/tldr/latexmk index b563bda9..3d26e78f 100644 --- a/tldr/latexmk +++ b/tldr/latexmk @@ -15,19 +15,23 @@ source: https://github.com/tldr-pages/tldr.git - Compile a DVI document from a specific source file: -`latexmk {{source.tex}}` +`latexmk {{path/to/source.tex}}` - Compile a PDF document: -`latexmk -pdf {{source.tex}}` +`latexmk -pdf {{path/to/source.tex}}` + +- Open the document in a viewer and continuously update it whenever source files change: + +`latexmk -pvc {{path/to/source.tex}}` - Force the generation of a document even if there are errors: -`latexmk -f {{source.tex}}` +`latexmk -f {{path/to/source.tex}}` - Clean up temporary TEX files created for a specific TEX file: -`latexmk -c {{source.tex}}` +`latexmk -c {{path/to/source.tex}}` - Clean up all temporary TEX files in the current directory: diff --git a/tldr/linux/autorecon b/tldr/linux/autorecon new file mode 100644 index 00000000..6c568670 --- /dev/null +++ b/tldr/linux/autorecon @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# autorecon + +> A multi-threaded network reconnaissance tool which performs automated enumeration of services. +> More information: . + +- Perform reconnaissance on target host(s) (detailed scan results will be dumped in `./results`): + +`sudo autorecon {{host_or_ip1,host_or_ip2,...}}` + +- Perform reconnaissance on [t]arget(s) from a file: + +`sudo autorecon --target-file {{path/to/file}}` + +- [o]utput results to a different directory: + +`sudo autorecon --output {{path/to/results}} {{host_or_ip1,host_or_ip2,...}}` + +- Limit scanning to specific [p]orts and protocols (`T` for TCP, `U` for UDP, `B` for both): + +`sudo autorecon --ports {{T:21-25,80,443,U:53,B:123}} {{host_or_ip1,host_or_ip2,...}}` diff --git a/tldr/linux/dnf5 b/tldr/linux/dnf5 new file mode 100644 index 00000000..1a8d4730 --- /dev/null +++ b/tldr/linux/dnf5 @@ -0,0 +1,43 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# dnf5 + +> Package management utility for RHEL, Fedora, and CentOS (it replaces dnf, which in turn replaced yum). +> DNF5 is a C++ rewrite of the DNF package manager featuring improved performance and a smaller size. +> For equivalent commands in other package managers, see . +> More information: . + +- Upgrade installed packages to the newest available versions: + +`sudo dnf5 upgrade` + +- Search packages via keywords: + +`dnf5 search {{keyword1 keyword2 ...}}` + +- Display details about a package: + +`dnf5 info {{package}}` + +- Install new packages (Note: use `-y` to confirm all prompts automatically): + +`sudo dnf5 install {{package1 package2 ...}}` + +- Remove packages: + +`sudo dnf5 remove {{package1 package2 ...}}` + +- List installed packages: + +`dnf5 list --installed` + +- Find which packages provide a given command: + +`dnf5 provides {{command}}` + +- Remove or expire cached data: + +`sudo dnf5 clean all` diff --git a/tldr/linux/eu-readelf b/tldr/linux/eu-readelf new file mode 100644 index 00000000..46684c9d --- /dev/null +++ b/tldr/linux/eu-readelf @@ -0,0 +1,17 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# eu-readelf + +> Displays information about ELF files. +> More information: . + +- Display all extractable information contained in the ELF file: + +`eu-readelf --all {{path/to/file}}` + +- Display the contents of all NOTE segments/sections, or of a particular segment/section: + +`eu-readelf --notes[={{.note.ABI-tag}}] {{path/to/file}}`