Update cheatsheets

This commit is contained in:
ivuorinen
2025-12-17 00:21:28 +00:00
parent 0881b6bcab
commit bda9e5a061
43 changed files with 339 additions and 67 deletions

18
tldr/linux/explodepkg Normal file
View File

@@ -0,0 +1,18 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# explodepkg
> Extract the contents of a Slackware package to the current directory.
> See also: `installpkg`, `removepkg`, `upgradepkg`, `makepkg`, `pkgtool`.
> More information: <https://www.slackbook.org/html/book.html#PACKAGE-MANAGEMENT-EXPLODEPKG>.
- Extract a package to the current directory:
`explodepkg {{path/to/package.tgz}}`
- Extract multiple packages to the current directory:
`explodepkg {{path/to/package1.tgz}} {{path/to/package2.tgz}}`

View File

@@ -6,12 +6,17 @@ source: https://github.com/tldr-pages/tldr.git
# fatrace
> Report file access events.
> See also: `inotifywait`.
> More information: <https://manned.org/fatrace>.
- Print file access events in all mounted filesystems to `stdout`:
`sudo fatrace`
- Limit output to a program with a specific name:
`sudo fatrace {{[-C|--command]}} {{program_name}}`
- Print file access events on the mount of the current directory, with timestamps, to `stdout`:
`sudo fatrace {{[-c|--current-mount]}} {{[-t|--timestamp]}}`
`sudo fatrace {{[-ct|--current-mount --timestamp]}}`

37
tldr/linux/imhex Normal file
View File

@@ -0,0 +1,37 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# imhex
> Hex editor for reverse engineers and programmers.
> More information: <https://docs.werwolv.net/imhex/>.
- Open a file in ImHex:
`imhex {{path/to/file}}`
- Create a new empty file:
`imhex --new`
- Open a file in the currently running ImHex instance and select a range of bytes (offsets in hexadecimal):
`imhex --open {{path/to/file}} --select {{0xstart_offset}} {{0xend_offset}}`
- Display information about a file:
`imhex --file-info {{path/to/file}}`
- Calculate the hash of a file using a specific algorithm (`md5`, `sha1`, `sha224`, `sha256`, `sha384`, `sha512`):
`imhex --hash {{algorithm}} {{path/to/file}}`
- Generate a hex dump of a file:
`imhex --hexdump {{path/to/file}}`
- Display version:
`imhex --version`

View File

@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# inotifywait
> Waits for changes to files.
> See also: `fatrace`.
> More information: <https://manned.org/inotifywait>.
- Watch a specific file for events, exiting after the first one:

View File

@@ -7,6 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
> Shell builtin for viewing information about processes spawned by the current shell.
> Options other than `-l` and `-p` are exclusive to Bash.
> See also: `fg`, `bg`, `disown`, `%`.
> More information: <https://www.gnu.org/software/bash/manual/bash.html#index-jobs>.
- View jobs spawned by the current shell:

21
tldr/linux/pkgdiff Normal file
View File

@@ -0,0 +1,21 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# pkgdiff
> Compare the file contents of two Slackware packages.
> More information: <https://slackware.nl/slackware/slackware64-current/source/a/pkgtools/manpages/pkgdiff.8>.
- Compare two packages and display differences:
`pkgdiff {{path/to/package1.txz}} {{path/to/package2.txz}}`
- Compare two packages with colorized output:
`pkgdiff -c {{path/to/package1.txz}} {{path/to/package2.txz}}`
- Compare two packages and output a simple unified diff:
`pkgdiff -a {{path/to/package1.txz}} {{path/to/package2.txz}}`

30
tldr/linux/pkgtool Normal file
View File

@@ -0,0 +1,30 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# pkgtool
> Interactive menu-driven tool for managing Slackware packages.
> See also: `installpkg`, `removepkg`, `upgradepkg`, `makepkg`.
> More information: <https://www.slackbook.org/html/book.html#PACKAGE-MANAGEMENT-PACKAGE-UTILITIES-PKGTOOL>.
- Launch the interactive package tool:
`sudo pkgtool`
- Remove packages interactively:
`sudo pkgtool --remove_menu`
- View installed packages:
`pkgtool --view_menu`
- Install packages from the current directory:
`sudo pkgtool --install_menu`
- Set up packages interactively (run doinst.sh scripts):
`sudo pkgtool --setup_menu`

View File

@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# strace
> Troubleshooting tool for tracing system calls.
> See also: `fatrace`.
> More information: <https://manned.org/strace>.
- Start tracing a specific process by its PID:

View File

@@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git
- Create a self-extracting binary file of a Zip archive:
`cat unzipsfx {{path/to/archive.zip}} > {{filename}} && chmod 755 {{filename}}`
`cat $(which unzipsfx) {{path/to/archive.zip}} > {{filename}} && chmod 755 {{filename}}`
- Extract a self-extracting binary in the current directory:

30
tldr/linux/upgradepkg Normal file
View File

@@ -0,0 +1,30 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# upgradepkg
> Upgrade Slackware packages by replacing existing packages with new versions.
> See also: `installpkg`, `removepkg`, `makepkg`, `pkgtool`.
> More information: <https://slackware.nl/slackware/slackware64-current/source/a/pkgtools/manpages/upgradepkg.8>.
- Upgrade a package:
`sudo upgradepkg {{path/to/package.tgz}}`
- Upgrade a package, installing it if not already present:
`sudo upgradepkg --install-new {{path/to/package.tgz}}`
- Reinstall a package (even if the same version is already installed):
`sudo upgradepkg --reinstall {{path/to/package.tgz}}`
- Preview what would happen without actually upgrading:
`upgradepkg --dry-run {{path/to/package.tgz}}`
- Upgrade a package and show detailed progress:
`sudo upgradepkg --verbose {{path/to/package.tgz}}`