diff --git a/technology/applications/Applications.md b/technology/applications/Applications.md index 066a3bb..38e6c49 100644 --- a/technology/applications/Applications.md +++ b/technology/applications/Applications.md @@ -1,6 +1,6 @@ --- obj: meta/collection -rev: 2025-01-30 +rev: 2024-12-10 --- # Applications @@ -39,7 +39,6 @@ rev: 2025-01-30 ## Desktop - [KDE Plasma](./desktops/KDE%20Plasma.md) - [SDDM](./desktops/SDDM.md) -- [spectacle](./desktops/spectacle.md) - [dwm](./desktops/dwm.md) - [picom](./desktops/picom.md) - [Hyprland](./desktops/hyprland.md) @@ -52,23 +51,21 @@ rev: 2025-01-30 - [DB Browser for SQLite](./development/DB%20Browser%20for%20SQLite.md) - [Ghidra](./development/Ghidra.md) - [GitHub Desktop](./development/GitHub%20Desktop.md) -- [delta](./development/delta.md) - [HTTPie](./development/HTTPie.md) - [MongoDB Compass](./development/MongoDB%20Compass.md) - [MongoDB](./development/MongoDB.md) -- [PostgreSQL](./development/Postgres.md) +- [Postgres](./development/Postgres.md) - [Podman Desktop](./development/Podman%20Desktop.md) - [Visual Studio Code](./development/Visual%20Studio%20Code.md) - [continue](./development/continue.md) - [psequel](development/psequel.md) -- [Valkey](./development/valkey.md) +- [PostgreSQL](development/Postgres.md) ## Documents - [Tachiyomi](./documents/Tachiyomi.md) - [LibreOffice](./office/LibreOffice.md) - [Obsidian](./office/Obsidian.md) - [Typst](../tools/Typst.md) -- [mdbook](./office/mdbook.md) ## Finance - [Feather Wallet](./finance/Feather%20Wallet.md) @@ -80,8 +77,6 @@ rev: 2025-01-30 - [Lutris](./gaming/Lutris.md) - [Steam](./gaming/Steam.md) - [Steam ROM Manager](./gaming/Steam%20ROM%20Manager.md) -- [dualsensectl](./gaming/dualsensectl.md) -- [MangoHUD](./gaming/MangoHUD.md) ## Network - [JDownloader](./network/JDownloader.md) @@ -110,7 +105,6 @@ rev: 2025-01-30 - [SnapDrop](./network/SnapDrop.md) - [OnionShare](./network/OnionShare.md) - [qBittorrent](./network/qBittorrent.md) -- [bitmagnet](./web/bitmagnet.md) ## Utilities - [Bottles](./utilities/Bottles.md) @@ -125,7 +119,7 @@ rev: 2025-01-30 - [Wildcard](utilities/Wildcard.md) - [Textpieces](utilities/Textpieces.md) - [ImHex](utilities/ImHex.md) -- [Octopi](utilities/octopi.md) +- [VirtManager](utilities/virt-manager.md) # Mobile - [Aegis](./utilities/Aegis.md) @@ -139,7 +133,6 @@ rev: 2025-01-30 - [Google Calendar](./office/Google%20Calendar.md) - [Google Contacts](./office/Google%20Contacts.md) - [OwnTracks](./mobile/OwnTracks.md) -- [TrailSense](./mobile/TrailSense.md) # Web - [Authelia](./web/Authelia.md) @@ -175,16 +168,6 @@ rev: 2025-01-30 - [Caddy](./web/Caddy.md) - [zigbee2MQTT](./web/zigbee2mqtt.md) - [dawarich](./web/dawarich.md) -- [glance](./web/glance.md) -- [ntfy](./web/ntfy.md) -- [owncast](./web/owncast.md) -- [panamax](./web/panamax.md) -- [stalwart](./web/stalwart.md) -- [OpenGist](./web/opengist.md) -- [SFTPGo](./web/sftpgo.md) -- [Lemmy](./web/lemmy.md) -- [Stump](./web/stump.md) -- [FleetDM](./web/FleetDM.md) # CLI ## Terminal @@ -194,8 +177,6 @@ rev: 2025-01-30 - [Shell](./cli/Shell.md) - [bash](./cli/bash.md) - [zsh](./cli/zsh.md) -- [fish](./cli/fish.md) -- [starship](./cli/starship.md) ## Compression - [p7zip](./cli/compression/p7zip.md) @@ -218,7 +199,6 @@ rev: 2025-01-30 - [bat](./cli/bat.md) - [glow](./cli/glow.md) - [tailspin](./cli/tailspin.md) -- [csvlens](./cli/csvlens.md) ### Editor - [nano](./cli/nano.md) @@ -254,23 +234,11 @@ rev: 2025-01-30 - [yazi](./cli/yazi.md) - [GPG](../cryptography/GPG.md) - [OpenSSL](../cryptography/OpenSSL.md) -- [age](../cryptography/age.md) -- [minisign](../cryptography/minisign.md) - [tomb](./cli/tomb.md) - [dysk](./cli/dysk.md) - [pass](./cli/pass.md) - [ocrs](./cli/ocrs.md) - [stew](./cli/stew.md) -- [names](./cli/names.md) -- [qrtool](./cli/qrtool.md) -- [tagctl](./cli/tagctl.md) -- [unionfarm](./cli/unionfarm.md) -- [xt](./cli/xt.md) -- [refold](./cli/refold.md) -- [rexturl](./cli/rexturl.md) -- [mhost](./cli/mhost.md) -- [timr-tui](./cli/timr-tui.md) -- [skate](./cli/skate.md) ## System - [Core Utils](./cli/system/Core%20Utils.md) @@ -285,11 +253,6 @@ rev: 2025-01-30 - [wine](../windows/Wine.md) - [sbctl](../linux/sbctl.md) - [systemd-cryptenroll](../linux/systemd/systemd-cryptenroll.md) -- [bubblewrap](./utilities/bubblewrap.md) -- [retry-cli](./utilities/retry-cli.md) -- [systeroid](./utilities/systeroid.md) -- [distrobox](./utilities/distrobox.md) -- [osquery](./utilities/osquery.md) ## Development - [act](./development/act.md) @@ -299,24 +262,11 @@ rev: 2025-01-30 - [tokei](./cli/tokei.md) - [gum](./cli/gum.md) - [git](../dev/Git.md) -- [gitql](../dev/gitql.md) - [Ansible](../tools/Ansible/Ansible.md) - [Docker](../tools/Docker.md) - [Podman](../tools/Podman.md) -- [k3s](../tools/k3s.md) -- [k9s](../tools/k9s.md) -- [sops](../tools/sops.md) - [serie](./cli/serie.md) - [usql](./cli/usql.md) -- [limbo](./development/limbo.md) -- [kondo](./cli/kondo.md) -- [licensit](./development/licensit.md) -- [onefetch](./development/onefetch.md) -- [ruff](./development/ruff.md) -- [uv](./development/uv.md) -- [rust-script](./development/rust-script.md) -- [renovatebot](./development/renovate.md) -- [hl](./development/hl.md) ## Media - [yt-dlp](./media/yt-dlp.md) @@ -325,11 +275,6 @@ rev: 2025-01-30 - [ImageMagick](./media/ImageMagick.md) - [pywal](./media/images/pywal.md) - [viu](./cli/viu.md) -- [wallust](./media/wallust.md) -- [artem](./media/artem.md) -- [auto-palette-cli](./media/auto-palette-cli.md) -- [metadata](./media/metadata-cli.md) -- [ab-av1](./media/ab-av1.md) ## Network - [rclone](./network/rclone.md) @@ -357,4 +302,3 @@ rev: 2025-01-30 ## Backup - [borg](./backup/borg.md) - [borgmatic](./backup/borgmatic.md) -- [restic](./backup/restic.md) diff --git a/technology/applications/backup/restic.md b/technology/applications/backup/restic.md deleted file mode 100644 index 929bcd5..0000000 --- a/technology/applications/backup/restic.md +++ /dev/null @@ -1,607 +0,0 @@ ---- -obj: application -website: https://restic.net -repo: https://github.com/restic/restic ---- - -# restic -restic is a backup program which allows saving multiple revisions of files and directories in an encrypted repository stored on different backends. - -## Usage -Usage: `restic [command] [options]` - -### Global Options - -| Option | Environment | Description | -| ---------------------------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -| `--cacert` file | `$RESTIC_CACERT` | file to load root certificates from (default: use system certificates or `$RESTIC_CACERT`) | -| `--cache-dir` directory | | set the cache directory. (default: use system default cache directory) | -| `--cleanup-cache` | | auto remove old cache directories | -| `--compression` mode | `$RESTIC_COMPRESSION` | compression mode (only available for repository format version 2), one of (auto/off/max) (default: `$RESTIC_COMPRESSION`) (default auto) | -| `-h`, `--help` | | help for restic | -| `--http-user-agent` string | | set a http user agent for outgoing http requests | -| `--insecure-no-password` | | use an empty password for the repository, must be passed to every restic command (insecure) | -| `--insecure-tls` | | skip TLS certificate verification when connecting to the repository (insecure) | -| `--json` | | set output mode to JSON for commands that support it | -| `--key-hint` key | `$RESTIC_KEY_HINT` | key ID of key to try decrypting first (default: `$RESTIC_KEY_HINT`) | -| `--limit-download` rate | | limits downloads to a maximum rate in KiB/s. (default: unlimited) | -| `--limit-upload` rate | | limits uploads to a maximum rate in KiB/s. (default: unlimited) | -| `--no-cache` | | do not use a local cache | -| `--no-extra-verify` | | skip additional verification of data before upload (see documentation) | -| `--no-lock` | | do not lock the repository, this allows some operations on read-only repositories | -| `-o`, `--option` key=value | | set extended option (key=value, can be specified multiple times) | -| `--pack-size` size | `$RESTIC_PACK_SIZE` | set target pack size in MiB, created pack files may be larger (default: `$RESTIC_PACK_SIZE`) | -| `--password-command` command | `$RESTIC_PASSWORD_COMMAND` | shell command to obtain the repository password from (default: `$RESTIC_PASSWORD_COMMAND`) | -| `-p`, `--password-file` file | `$RESTIC_PASSWORD_FILE` | file to read the repository password from (default: `$RESTIC_PASSWORD_FILE`) | -| `-q`, `--quiet` | | do not output comprehensive progress report | -| `-r`, `--repo` repository | `$RESTIC_REPOSITORY` | repository to backup to or restore from (default: `$RESTIC_REPOSITORY`) | -| `--repository-file` file | `$RESTIC_REPOSITORY_FILE` | file to read the repository location from (default: `$RESTIC_REPOSITORY_FILE`) | -| `--retry-lock` duration | | retry to lock the repository if it is already locked, takes a value like 5m or 2h (default: no retries) | -| `--stuck-request-timeout` duration | | duration after which to retry stuck requests (default 5m0s) | -| `--tls-client-cert` file | `$RESTIC_TLS_CLIENT_CERT` | path to a file containing PEM encoded TLS client certificate and private key (default: `$RESTIC_TLS_CLIENT_CERT`) | -| `-v`, `--verbose` | | be verbose (specify multiple times or a level using --verbose=n, max level/times is 2) | - - -### backup - -The "backup" command creates a new snapshot and saves the files and directories given as the arguments. - -Exit Codes: -- Exit status is 0 if the command was successful. -- Exit status is 1 if there was a fatal error (no snapshot created). -- Exit status is 3 if some source data could not be read (incomplete snapshot created). -- Exit status is 10 if the repository does not exist. -- Exit status is 11 if the repository is already locked. -- Exit status is 12 if the password is incorrect. - -Usage: `restic backup [flags] [FILE/DIR] ...` - -| Option | Environment | Description | -| ---------------------------------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `-n`, `--dry-run` | | do not upload or write any data, just show what would be done | -| `-e`, `--exclude pattern` | | exclude a pattern (can be specified multiple times) | -| `--exclude-caches` | | excludes cache directories that are marked with a CACHEDIR.TAG file. See https://bford.info/cachedir/ for the Cache Directory Tagging Standard | -| `--exclude-file file` | | read exclude patterns from a file (can be specified multiple times) | -| `--exclude-if-present filename[:header]` | | takes `filename[:header]`, exclude contents of directories containing filename (except filename itself) if header of that file is as provided (can be specified multiple times) | -| `--exclude-larger-than size` | | max size of the files to be backed up (allowed suffixes: k/K, m/M, g/G, t/T) | -| `--files-from file` | | read the files to backup from file (can be combined with file args; can be specified multiple times) | -| `--files-from-raw file` | | read the files to backup from file (can be combined with file args; can be specified multiple times) | -| `--files-from-verbatim file` | | read the files to backup from file (can be combined with file args; can be specified multiple times) | -| `-f`, `--force` | | force re-reading the source files/directories (overrides the "parent" flag) | -| `-g`, `--group-by group` | | group snapshots by host, paths and/or tags, separated by comma (disable grouping with '') (default host,paths) | -| `-H`, `--host hostname` | `$RESTIC_HOST` | set the hostname for the snapshot manually. To prevent an expensive rescan use the "parent" flag | -| `--iexclude pattern` | | same as --exclude pattern but ignores the casing of filenames | -| `--iexclude-file file` | | same as --exclude-file but ignores casing of filenames in patterns | -| `--ignore-ctime` | | ignore ctime changes when checking for modified files | -| `--ignore-inode` | | ignore inode number and ctime changes when checking for modified files | -| `--no-scan` | | do not run scanner to estimate size of backup | -| `-x`, `--one-file-system` | | exclude other file systems, don't cross filesystem boundaries and subvolumes | -| `--parent snapshot` | | use this parent snapshot (default: latest snapshot in the group determined by --group-by and not newer than the timestamp determined by --time) | -| `--read-concurrency n` | `$RESTIC_READ_CONCURRENCY` | read n files concurrently (default: `$RESTIC_READ_CONCURRENCY` or 2) | -| `--skip-if-unchanged` | | skip snapshot creation if identical to parent snapshot | -| `--stdin` | | read backup from stdin | -| `--stdin-filename filename` | | filename to use when reading from stdin (default "stdin") | -| `--stdin-from-command` | | interpret arguments as command to execute and store its stdout | -| `--tag tags` | | add tags for the new snapshot in the format `tag[,tag,...]` (can be specified multiple times) (default []) | -| `--time time` | | time of the backup (ex. '2012-11-01 22:08:41') (default: now) | -| `--with-atime` | | store the atime for all files and directories | - -### cache - -The "cache" command allows listing and cleaning local cache directories. - -Exit Codes: -- Exit status is 0 if the command was successful. -- Exit status is 1 if there was any error. - -Usage: `restic cache [flags]` - -| Option | Environment | Description | -| ---------------- | ----------- | ----------------------------------------------------------------------- | -| `--cleanup` | | remove old cache directories | -| `--max-age days` | | max age in days for cache directories to be considered old (default 30) | -| `--no-size` | | do not output the size of the cache directories | - -### cat - -The "cat" command is used to print internal objects to stdout. - -Exit Codes: -- Exit status is 0 if the command was successful. -- Exit status is 1 if there was any error. -- Exit status is 10 if the repository does not exist. -- Exit status is 11 if the repository is already locked. -- Exit status is 12 if the password is incorrect. - -Usage: `restic cat [flags] [masterkey|config|pack ID|blob ID|snapshot ID|index ID|key ID|lock ID|tree snapshot:subfolder]` - -### check - -The "check" command tests the repository for errors and reports any errors it finds. It can also be used to read all data and therefore simulate a restore. - -By default, the "check" command will always load all data directly from the repository and not use a local cache. - -Exit Codes: -- Exit status is 0 if the command was successful. -- Exit status is 1 if there was any error. -- Exit status is 10 if the repository does not exist. -- Exit status is 11 if the repository is already locked. -- Exit status is 12 if the password is incorrect. - -Usage: `restic check [flags]` - -| Option | Description | -| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `--read-data` | read all data blobs | -| `--read-data-subset subset` | read a subset of data packs, specified as 'n/t' for specific part, or either 'x%' or 'x.y%' or a size in bytes with suffixes k/K, m/M, g/G, t/T for a random subset | -| `--with-cache` | use existing cache, only read uncached data from repository | - - -### copy - -The "copy" command copies one or more snapshots from one repository to another. - -> **NOTE**: This process will have to both download (read) and upload (write) the entire snapshot(s) due to the different encryption keys used in the source and destination repositories. This *may incur higher bandwidth usage and costs* than expected during normal backup runs. - -> **NOTE**: The copying process does not re-chunk files, which may break deduplication between the files copied and files already stored in the destination repository. This means that copied files, which existed in both the source and destination repository, *may occupy up to twice their space* in the destination repository. This can be mitigated by the `--copy-chunker-params` option when initializing a new destination repository using the "init" command. - -Exit Codes: -- Exit status is 0 if the command was successful. -- Exit status is 1 if there was any error. -- Exit status is 10 if the repository does not exist. -- Exit status is 11 if the repository is already locked. -- Exit status is 12 if the password is incorrect. - -Usage: `restic copy [flags] [snapshotID ...]` - -| Option | Environment | Description | -| --------------------------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `--from-insecure-no-password` | | use an empty password for the source repository (insecure) | -| `--from-key-hint string` | `$RESTIC_FROM_KEY_HINT` | key ID of key to try decrypting the source repository first (default: $RESTIC_FROM_KEY_HINT) | -| `--from-password-command command` | `$RESTIC_FROM_PASSWORD_COMMAND` | shell command to obtain the source repository password from (default: $RESTIC_FROM_PASSWORD_COMMAND) | -| `--from-password-file file` | `$RESTIC_FROM_PASSWORD_FILE` | file to read the source repository password from (default: $RESTIC_FROM_PASSWORD_FILE) | -| `--from-repo repository` | `$RESTIC_FROM_REPOSITORY` | source repository to copy snapshots from (default: $RESTIC_FROM_REPOSITORY) | -| `--from-repository-file file` | `$RESTIC_FROM_REPOSITORY_FILE` | file from which to read the source repository location to copy snapshots from (default: $RESTIC_FROM_REPOSITORY_FILE) | -| `-H`, `--host host` | `$RESTIC_HOST` | only consider snapshots for this host (can be specified multiple times) (default: $RESTIC_HOST) | -| `--path path` | | only consider snapshots including this (absolute) path (can be specified multiple times, snapshots must include all specified paths) | -| `--tag tag[,tag,...]` | | only consider snapshots including `tag[,tag,...]` (can be specified multiple times) (default []) | - - -### diff - -The "diff" command shows differences from the first to the second snapshot. The first characters in each line display what has happened to a particular file or directory: - -* `+` The item was added -* `-` The item was removed -* `U` The metadata (access mode, timestamps, ...) for the item was updated -* `M` The file's content was modified -* `T` The type was changed, e.g. a file was made a symlink -* `?` Bitrot detected: The file's content has changed but all metadata is the same - -Metadata comparison will likely not work if a backup was created using the `--ignore-inode` or `--ignore-ctime` option. - -To only compare files in specific subfolders, you can use the `snapshotID:subfolder` syntax, where `subfolder` is a path within the snapshot. - -Exit Codes: -- Exit status is 0 if the command was successful. -- Exit status is 1 if there was any error. -- Exit status is 10 if the repository does not exist. -- Exit status is 11 if the repository is already locked. -- Exit status is 12 if the password is incorrect. - -Usage: `restic diff [--metadata] snapshotID snapshotID` - -### dump - -The "dump" command extracts files from a snapshot from the repository. If a single file is selected, it prints its contents to stdout. Folders are output as a tar (default) or zip file containing the contents of the specified folder. -Pass "/" as file name to dump the whole snapshot as an archive file. - -The special snapshotID "latest" can be used to use the latest snapshot in the repository. - -To include the folder content at the root of the archive, you can use the `snapshotID:subfolder` syntax, where `subfolder` is a path within the snapshot. - -Exit Codes: -- Exit status is 0 if the command was successful. -- Exit status is 1 if there was any error. -- Exit status is 10 if the repository does not exist. -- Exit status is 11 if the repository is already locked. -- Exit status is 12 if the password is incorrect. - -Usage: `restic dump [flags] snapshotID file` - -| Option | Environment | Description | -| ------------------------ | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `-a`, `--archive format` | | set archive format as "tar" or "zip" (default "tar") | -| `-H`, `--host host` | `$RESTIC_HOST` | only consider snapshots for this host, when snapshot ID "latest" is given (can be specified multiple times) (default: $RESTIC_HOST) | -| `--path path` | | only consider snapshots including this (absolute) path, when snapshot ID "latest" is given (can be specified multiple times, snapshots must include all specified paths) | -| `--tag tag[,tag,...]` | | only consider snapshots including `tag[,tag,...]`, when snapshot ID "latest" is given (can be specified multiple times) (default []) | -| `-t`, `--target path` | | write the output to target path | - -### find - -The "find" command searches for files or directories in snapshots stored in the repo. -It can also be used to search for restic blobs or trees for troubleshooting. -The default sort option for the snapshots is youngest to oldest. To sort the output from oldest to youngest specify `--reverse`. - -Usage: `restic find [flags] PATTERN...` - -Examples: -``` -restic find config.json -restic find --json "*.yml" "*.json" -restic find --json --blob 420f620f b46ebe8a ddd38656 -restic find --show-pack-id --blob 420f620f -restic find --tree 577c2bc9 f81f2e22 a62827a9 -restic find --pack 025c1d06 -``` - -Exit Codes: -- Exit status is 0 if the command was successful. -- Exit status is 1 if there was any error. -- Exit status is 10 if the repository does not exist. -- Exit status is 11 if the repository is already locked. -- Exit status is 12 if the password is incorrect. - -| Option | Environment | Description | -| ----------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `--blob` | | pattern is a blob-ID | -| `-H`, `--host host` | `$RESTIC_HOST` | only consider snapshots for this host (can be specified multiple times) (default: $RESTIC_HOST) | -| `--human-readable` | | print sizes in human readable format | -| `-i`, `--ignore-case` | | ignore case for pattern | -| `-l`, `--long` | | use a long listing format showing size and mode | -| `-N`, `--newest string` | | newest modification date/time | -| `-O`, `--oldest string` | | oldest modification date/time | -| `--pack` | | pattern is a pack-ID | -| `--path path` | | only consider snapshots including this (absolute) path (can be specified multiple times, snapshots must include all specified paths) | -| `-R`, `--reverse` | | reverse sort order oldest to newest | -| `--show-pack-id` | | display the pack-ID the blobs belong to (with --blob or --tree) | -| `-s`, `--snapshot id` | | snapshot id to search in (can be given multiple times) | -| `--tag tag[,tag,...]` | | only consider snapshots including `tag[,tag,...]` (can be specified multiple times) (default []) | -| `--tree` | | pattern is a tree-ID | - -### forget - -The "forget" command removes snapshots according to a policy. All snapshots are first divided into groups according to `--group-by`, and after that the policy specified by the `--keep-*` options is applied to each group individually. -If there are not enough snapshots to keep one for each duration related `--keep-{within-,}*` option, the oldest snapshot in the group is kept additionally. - -Please note that this command really only deletes the snapshot object in the repository, which is a reference to data stored there. In order to remove the unreferenced data after "forget" was run successfully, see the "prune" command. - -Please also read the documentation for "forget" to learn about some important security considerations. - -Exit Codes: -- Exit status is 0 if the command was successful. -- Exit status is 1 if there was any error. -- Exit status is 10 if the repository does not exist. -- Exit status is 11 if the repository is already locked. -- Exit status is 12 if the password is incorrect. - -Usage: `restic forget [flags] [snapshot ID] [...]` - -| Option | Environment | Description | -| ----------------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `-l`, `--keep-last n` | | keep the last n snapshots (use 'unlimited' to keep all snapshots) | -| `-H`, `--keep-hourly n` | | keep the last n hourly snapshots (use 'unlimited' to keep all hourly snapshots) | -| `-d`, `--keep-daily n` | | keep the last n daily snapshots (use 'unlimited' to keep all daily snapshots) | -| `-w`, `--keep-weekly n` | | keep the last n weekly snapshots (use 'unlimited' to keep all weekly snapshots) | -| `-m`, `--keep-monthly n` | | keep the last n monthly snapshots (use 'unlimited' to keep all monthly snapshots) | -| `-y`, `--keep-yearly n` | | keep the last n yearly snapshots (use 'unlimited' to keep all yearly snapshots) | -| `--keep-within duration` | | keep snapshots that are newer than duration (e.g., 1y5m7d2h) relative to the latest snapshot | -| `--keep-within-hourly duration` | | keep hourly snapshots newer than duration (e.g., 1y5m7d2h) relative to the latest snapshot | -| `--keep-within-daily duration` | | keep daily snapshots newer than duration (e.g., 1y5m7d2h) relative to the latest snapshot | -| `--keep-within-weekly duration` | | keep weekly snapshots newer than duration (e.g., 1y5m7d2h) relative to the latest snapshot | -| `--keep-within-monthly duration` | | keep monthly snapshots newer than duration (e.g., 1y5m7d2h) relative to the latest snapshot | -| `--keep-within-yearly duration` | | keep yearly snapshots newer than duration (e.g., 1y5m7d2h) relative to the latest snapshot | -| `--keep-tag taglist` | | keep snapshots with this taglist (can be specified multiple times) (default []) | -| `--unsafe-allow-remove-all` | | allow deleting all snapshots of a snapshot group | -| `--host host` | `$RESTIC_HOST` | only consider snapshots for this host (can be specified multiple times) (default: $RESTIC_HOST) | -| `--tag tag[,tag,...]` | | only consider snapshots including `tag[,tag,...]` (can be specified multiple times) (default []) | -| `--path path` | | only consider snapshots including this (absolute) path (can be specified multiple times, snapshots must include all specified paths) | -| `-c`, `--compact` | | use compact output format | -| `-g`, `--group-by group` | | group snapshots by host, paths and/or tags, separated by comma (disable grouping with '') (default host,paths) | -| `-n`, `--dry-run` | | do not delete anything, just print what would be done | -| `--prune` | | automatically run the 'prune' command if snapshots have been removed | -| `--max-unused limit` | | tolerate given limit of unused data (absolute bytes with suffixes k/K, m/M, g/G, t/T, %, or 'unlimited') (default "5%") | -| `--max-repack-size size` | | stop after repacking this much data in total (allowed suffixes: k/K, m/M, g/G, t/T) | -| `--repack-cacheable-only` | | only repack packs which are cacheable | -| `--repack-small` | | repack pack files below 80% of target pack size | -| `--repack-uncompressed` | | repack all uncompressed data | -| `--repack-smaller-than below-limit` | | pack below-limit packfiles (allowed suffixes: k/K, m/M) | - -### init - -The "init" command initializes a new repository. - -Exit Codes: -- Exit status is 0 if the command was successful. -- Exit status is 1 if there was any error. - -Usage: `restic init [flags]` - -| Option | Environment | Description | -| ----------------------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `--copy-chunker-params` | | Copy chunker parameters from the secondary repository (useful with the copy command) | -| `--from-insecure-no-password` | | Use an empty password for the source repository (insecure) | -| `--from-key-hint` | `$RESTIC_FROM_KEY_HINT` | Key ID of key to try decrypting the source repository first | -| `--from-password-command` | `$RESTIC_FROM_PASSWORD_COMMAND` | Shell command to obtain the source repository password from | -| `--from-password-file` | `$RESTIC_FROM_PASSWORD_FILE` | File to read the source repository password from | -| `--from-repo` | `$RESTIC_FROM_REPOSITORY` | Source repository to copy chunker parameters from | -| `--from-repository-file` | `$RESTIC_FROM_REPOSITORY_FILE` | File from which to read the source repository location to copy chunker parameters from | -| `--repository-version` | | Repository format version to use, allowed values are a format version, `latest` and `stable` (default "stable") | - -### key - -The "key" command allows you to set multiple access keys or passwords per repository. - -Usage: `restic key [command]` - -#### key add -Add a new key (password) to the repository; returns the new key ID - -Usage: `restic key add [flags]` - -| Option | Environment | Description | -| ---------------------------- | ----------- | --------------------------------------------------- | -| `-h`, `--help` | | help for add | -| `--host string` | | the hostname for new key | -| `--new-insecure-no-password` | | add an empty password for the repository (insecure) | -| `--new-password-file file` | | file from which to read the new password | -| `--user string` | | the username for new key | - -#### key passwd -Change key (password); creates a new key ID and removes the old key ID, returns new key ID - -Usage: `restic key passwd [flags]` - -| Option | Environment | Description | -| ---------------------------- | ----------- | --------------------------------------------------- | -| `-h`, `--help` | | help for add | -| `--host string` | | the hostname for new key | -| `--new-insecure-no-password` | | add an empty password for the repository (insecure) | -| `--new-password-file file` | | file from which to read the new password | -| `--user string` | | the username for new key | - -#### key list -List keys (passwords) - -Usage: `restic key list` - -#### key remove -Remove key ID (password) from the repository. - -Usage: `restic key remove [ID] [flags]` - -### list - -The "list" command allows listing objects in the repository based on type. - -Exit Codes: -- Exit status is 0 if the command was successful. -- Exit status is 1 if there was any error. -- Exit status is 10 if the repository does not exist. -- Exit status is 11 if the repository is already locked. -- Exit status is 12 if the password is incorrect. - -Usage: `restic list [flags] [blobs|packs|index|snapshots|keys|locks]` - -### ls - -The "ls" command lists files and directories in a snapshot. - -The special snapshot ID "latest" can be used to list files and directories of the latest snapshot in the repository. The `--host` flag can be used in conjunction to select the latest snapshot originating from a certain host only. - -File listings can optionally be filtered by directories. Any positional arguments after the snapshot ID are interpreted as absolute directory paths, and only files inside those directories will be listed. If the `--recursive` flag is used, then the filter will allow traversing into matching directories' subfolders. -Any directory paths specified must be absolute (starting with a path separator); paths use the forward slash '/' as separator. - -File listings can be sorted by specifying `--sort` followed by one of the sort specifiers `(name|size|time=mtime|atime|ctime|extension)`. -The sorting can be reversed by specifying `--reverse`. - -Exit Codes: -- Exit status is 0 if the command was successful. -- Exit status is 1 if there was any error. -- Exit status is 10 if the repository does not exist. -- Exit status is 11 if the repository is already locked. -- Exit status is 12 if the password is incorrect. - -Usage: `restic ls [flags] snapshotID [dir...]` - -| Option | Environment | Description | -| ------------------ | -------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -| `-H`, `--host` | `$RESTIC_HOST` | Only consider snapshots for this host, when snapshot ID "latest" is given (can be specified multiple times) | -| `--human-readable` | | Print sizes in human readable format | -| `-l`, `--long` | | Use a long listing format showing size and mode | -| `--ncdu` | | Output NCDU export format (pipe into `ncdu -f -`) | -| `--path` | | Only consider snapshots including this (absolute) path, when snapshot ID "latest" is given (can be specified multiple times) | -| `--recursive` | | Include files in subfolders of the listed directories | -| `--reverse` | | Reverse sorted output | -| `-s`, `--sort` | | Sort output by (name\|size\|time=mtime\|atime\|ctime\|extension) (default name) | -| `--tag` | | Only consider snapshots including tag[,tag,...], when snapshot ID "latest" is given (can be specified multiple times) (default []) | - -### mount - -The "mount" command mounts the repository via fuse to a directory. This is a read-only mount. - -**Snapshot Directories**: -If you need a different template for directories that contain snapshots, -you can pass a time template via `--time-template` and path templates via `--path-template`. - -Example time template without colons: `--time-template "2006-01-02_15-04-05"` - -You need to specify a sample format for exactly the following timestamp: `Mon Jan 2 15:04:05 -0700 MST 2006` - -For path templates, you can use the following patterns which will be replaced: -- `%i` by short snapshot ID -- `%I` by long snapshot ID -- `%u` by username -- `%h` by hostname -- `%t` by tags -- `%T` by timestamp as specified by `--time-template` - -The default path templates are: -- `ids/%i` -- `snapshots/%T` -- `hosts/%h/%T` -- `tags/%t/%T` - -Exit Codes: -- Exit status is 0 if the command was successful. -- Exit status is 1 if there was any error. -- Exit status is 10 if the repository does not exist. -- Exit status is 11 if the repository is already locked. -- Exit status is 12 if the password is incorrect. - -Usage: `restic mount [flags] mountpoint` - -| Option | Environment | Description | -| -------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `--allow-other` | | Allow other users to access the data in the mounted directory | -| `-H`, `--host` | `$RESTIC_HOST` | Only consider snapshots for this host (can be specified multiple times) | -| `--no-default-permissions` | | For `--allow-other`, ignore Unix permissions and allow users to read all snapshot files | -| `--owner-root` | | Use `root` as the owner of files and dirs | -| `--path` | | Only consider snapshots including this (absolute) path (can be specified multiple times, snapshots must include all specified paths) | -| `--path-template` | | Set template for path names (can be specified multiple times) | -| `--tag` | | Only consider snapshots including `tag[,tag,...]` (can be specified multiple times) (default []) | -| `--time-template` | | Set template to use for times (default "2006-01-02T15:04:05Z07:00") | - -### prune - -The "prune" command checks the repository and removes data that is not referenced and therefore not needed any more. - -Usage: `restic prune [flags]` - -| Option | Environment | Description | -| -------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `-n`, `--dry-run` | | Do not modify the repository, just print what would be done | -| `--max-repack-size` | | Stop after repacking this much data in total (allowed suffixes: k/K, m/M, g/G, t/T) | -| `--max-unused` | | Tolerate given limit of unused data (absolute value in bytes with suffixes k/K, m/M, g/G, t/T, a value in % or the word 'unlimited') (default "5%") | -| `--repack-cacheable-only` | | Only repack packs which are cacheable | -| `--repack-small` | | Repack pack files below 80% of target pack size | -| `--repack-smaller-than` | | Pack below-limit packfiles (allowed suffixes: k/K, m/M) | -| `--repack-uncompressed` | | Repack all uncompressed data | -| `--unsafe-recover-no-free-space` | | **UNSAFE**, read the documentation before using! Try to recover a repository stuck with no free space. Do not use without trying 'prune --max-repack-size 0' first. | - - -### restore - -The "restore" command extracts the data from a snapshot from the repository to a directory. - -The special snapshotID "latest" can be used to restore the latest snapshot in the repository. - -To only restore a specific subfolder, you can use the `snapshotID:subfolder` syntax, where `subfolder` is a path within the snapshot. - -Usage: `restic restore [flags] snapshotID` - -| Option | Environment | Description | -| ----------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `--delete` | | Delete files from target directory if they do not exist in snapshot. Use `--dry-run -vv` to check what would be deleted | -| `--dry-run` | | Do not write any data, just show what would be done | -| `-e`, `--exclude` | | Exclude a pattern (can be specified multiple times) | -| `--exclude-file` | | Read exclude patterns from a file (can be specified multiple times) | -| `--exclude-xattr` | | Exclude xattr by pattern (can be specified multiple times) | -| `-H`, `--host` | `$RESTIC_HOST` | Only consider snapshots for this host, when snapshot ID "latest" is given (can be specified multiple times) | -| `--iexclude` | | Same as `--exclude` but ignores the casing of filenames | -| `--iexclude-file` | | Same as `--exclude-file` but ignores casing of filenames in patterns | -| `--iinclude` | | Same as `--include` but ignores the casing of filenames | -| `--iinclude-file` | | Same as `--include-file` but ignores casing of filenames in patterns | -| `-i`, `--include` | | Include a pattern (can be specified multiple times) | -| `--include-file` | | Read include patterns from a file (can be specified multiple times) | -| `--include-xattr` | | Include xattr by pattern (can be specified multiple times) | -| `--overwrite` | | Overwrite behavior, one of (always\|if-changed\|if-newer\|never) (default always) | -| `--path` | | Only consider snapshots including this (absolute) path, when snapshot ID "latest" is given (can be specified multiple times) | -| `--sparse` | | Restore files as sparse | -| `--tag` | | Only consider snapshots including `tag[,tag,...]`, when snapshot ID "latest" is given (can be specified multiple times) (default []) | -| `-t`, `--target` | | Directory to extract data to | -| `--verify` | | Verify restored files content | - -### rewrite - -The "rewrite" command excludes files from existing snapshots. It creates new snapshots containing the same data as the original ones, but without the files you specify to exclude. All metadata (time, host, tags) will be preserved. - -The snapshots to rewrite are specified using the `--host`, `--tag` and `--path` options, or by providing a list of snapshot IDs. Please note that specifying neither any of these options nor a snapshot ID will cause the command to rewrite all snapshots. - -The special tag 'rewrite' will be added to the new snapshots to distinguish them from the original ones, unless `--forget` is used. If the `--forget` option is used, the original snapshots will instead be directly removed from the repository. - -Please note that the `--forget` option only removes the snapshots and not the actual data stored in the repository. In order to delete the no longer referenced data, use the "prune" command. - -When rewrite is used with the `--snapshot-summary` option, a new snapshot is created containing statistics summary data. Only two fields in the summary will be non-zero: TotalFilesProcessed and TotalBytesProcessed. - -When rewrite is called with one of the `--exclude` options, TotalFilesProcessed and TotalBytesProcessed will be updated in the snapshot summary. - -Usage: `restic rewrite [flags] [snapshotID ...]` - -| Option | Environment | Description | -| -------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `-n`, `--dry-run` | | Do not do anything, just print what would be done | -| `-e`, `--exclude` | | Exclude a pattern (can be specified multiple times) | -| `--exclude-file` | | Read exclude patterns from a file (can be specified multiple times) | -| `--forget` | | Remove original snapshots after creating new ones | -| `-H`, `--host` | `$RESTIC_HOST` | Only consider snapshots for this host (can be specified multiple times) | -| `--iexclude` | | Same as `--exclude` but ignores the casing of filenames | -| `--iexclude-file` | | Same as `--exclude-file` but ignores casing of filenames in patterns | -| `--new-host` | | Replace hostname | -| `--new-time` | | Replace time of the backup | -| `--path` | | Only consider snapshots including this (absolute) path (can be specified multiple times; snapshots must include all specified paths) | -| `-s`, `--snapshot-summary` | | Create snapshot summary record if it does not exist | -| `--tag` | | Only consider snapshots including tag\[,tag,...] (can be specified multiple times) (default: `[]`) | - -### snapshots - -The "snapshots" command lists all snapshots stored in the repository. - -Usage: `restic snapshots [flags] [snapshotID ...]` - -| Option | Environment | Description | -| ---------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `-c, --compact` | | use compact output format | -| `-g, --group-by group` | | group snapshots by host, paths and/or tags, separated by comma | -| `-H, --host host` | `$RESTIC_HOST` | only consider snapshots for this host (can be specified multiple times) | -| `--latest n` | | only show the last n snapshots for each host and path | -| `--path path` | | only consider snapshots including this (absolute) path (can be specified multiple times, snapshots must include all specified paths) | -| `--tag tag[,tag,...]` | | only consider snapshots including `tag[,tag,...]` (can be specified multiple times) (default []) | - -### stats - -The "stats" command walks one or multiple snapshots in a repository and accumulates statistics about the data stored therein. It reports on the number of unique files and their sizes, according to one of the counting modes as given by the `--mode` flag. - -It operates on all snapshots matching the selection criteria or all snapshots if nothing is specified. The special snapshot ID "latest" is also supported. Some modes make more sense over just a single snapshot, while others are useful across all snapshots, depending on what you are trying to calculate. - -The modes are: - -* restore-size: (default) Counts the size of the restored files. -* files-by-contents: Counts total size of unique files, where a file is considered unique if it has unique contents. -* raw-data: Counts the size of blobs in the repository, regardless of how many files reference them. -* blobs-per-file: A combination of files-by-contents and raw-data. - -Refer to the online manual for more details about each mode. - -Usage: `restic stats [flags] [snapshot ID] [...]` - -| Option | Environment | Description | -| --------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `-H, --host host` | `$RESTIC_HOST` | only consider snapshots for this host (can be specified multiple times) | -| `--mode string` | | counting mode: restore-size (default), files-by-contents, blobs-per-file or raw-data (default "restore-size") | -| `--path path` | | only consider snapshots including this (absolute) path (can be specified multiple times, snapshots must include all specified paths) | -| `--tag tag[,tag,...]` | | only consider snapshots including `tag[,tag,...]` (can be specified multiple times) (default []) | - -### tag - -The "tag" command allows you to modify tags on exiting snapshots. - -You can either set/replace the entire set of tags on a snapshot, or add tags to/remove tags from the existing set. - -When no snapshotID is given, all snapshots matching the host, tag and path filter criteria are modified. - -Usage: `restic tag [flags] [snapshotID ...]` - -| Option | Environment | Description | -| --------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| `--add tags` | | tags which will be added to the existing tags in the format `tag[,tag,...]` (can be given multiple times) (default []) | -| `-H, --host host` | `$RESTIC_HOST` | only consider snapshots for this host (can be specified multiple times) (default: $RESTIC_HOST) | -| `--path path` | | only consider snapshots including this (absolute) path (can be specified multiple times, snapshots must include all specified paths) | -| `--remove tags` | | tags which will be removed from the existing tags in the format `tag[,tag,...]` (can be given multiple times) (default []) | -| `--set tags` | | tags which will replace the existing tags in the format `tag[,tag,...]` (can be given multiple times) (default []) | -| `--tag tag[,tag,...]` | | only consider snapshots including tag[,tag,...] (can be specified multiple times) (default []) | - -### unlock -The "unlock" command removes stale locks that have been created by other restic processes. - -Usage: `restic unlock [--remove-all] [flags]` diff --git a/technology/applications/cli/csvlens.md b/technology/applications/cli/csvlens.md deleted file mode 100644 index 4ebb5be..0000000 --- a/technology/applications/cli/csvlens.md +++ /dev/null @@ -1,80 +0,0 @@ ---- -obj: application -repo: https://github.com/ys-l/csvlens -rev: 2025-01-31 ---- - -# csvlens -`csvlens` is a command line CSV file viewer. It is like `less` but made -for CSV. - -## Usage -Run `csvlens` by providing the CSV filename: - -``` -csvlens -``` - -Pipe CSV data directly to `csvlens`: - -``` - | csvlens -``` - -### Key bindings - -| Key | Action | -| ---------------------------- | ------------------------------------------------------------------ | -| `hjkl` (or `← ↓ ↑→ `) | Scroll one row or column in the given direction | -| `Ctrl + f` (or `Page Down`) | Scroll one window down | -| `Ctrl + b` (or `Page Up`) | Scroll one window up | -| `Ctrl + d` (or `d`) | Scroll half a window down | -| `Ctrl + u` (or `u`) | Scroll half a window up | -| `Ctrl + h` | Scroll one window left | -| `Ctrl + l` | Scroll one window right | -| `Ctrl + ←` | Scroll left to first column | -| `Ctrl + →` | Scroll right to last column | -| `G` (or `End`) | Go to bottom | -| `g` (or `Home`) | Go to top | -| `G` | Go to line `n` | -| `/` | Find content matching regex and highlight matches | -| `n` (in Find mode) | Jump to next result | -| `N` (in Find mode) | Jump to previous result | -| `&` | Filter rows using regex (show only matches) | -| `*` | Filter columns using regex (show only matches) | -| `TAB` | Toggle between row, column or cell selection modes | -| `>` | Increase selected column's width | -| `<` | Decrease selected column's width | -| `Shift + ↓` (or `Shift + j`) | Sort rows or toggle sort direction by the selected column | -| `#` (in Cell mode) | Find and highlight rows like the selected cell | -| `@` (in Cell mode) | Filter rows like the selected cell | -| `y` | Copy the selected row or cell to clipboard | -| `Enter` (in Cell mode) | Print the selected cell to stdout and exit | -| `-S` | Toggle line wrapping | -| `-W` | Toggle line wrapping by words | -| `r` | Reset to default view (clear all filters and custom column widths) | -| `H` (or `?`) | Display help | -| `q` | Exit | - -### Optional parameters - -* `-d `: Use this delimiter when parsing the CSV - (e.g. `csvlens file.csv -d '\t'`). - - Specify `-d auto` to auto-detect the delimiter. - -* `-t`, `--tab-separated`: Use tab as the delimiter (when specified, `-d` is ignored). - -* `-i`, `--ignore-case`: Ignore case when searching. This flag is ignored if any - uppercase letters are present in the search string. - -* `--no-headers`: Do not interpret the first row as headers. - -* `--columns `: Use this regex to select columns to display by default. - -* `--filter `: Use this regex to filter rows to display by default. - -* `--find `: Use this regex to find and highlight matches by default. - -* `--echo-column `: Print the value of this column at the selected - row to stdout on `Enter` key and then exit. diff --git a/technology/applications/cli/fish.md b/technology/applications/cli/fish.md deleted file mode 100644 index 1202d9b..0000000 --- a/technology/applications/cli/fish.md +++ /dev/null @@ -1,278 +0,0 @@ ---- -obj: application -website: https://fishshell.com -repo: https://github.com/fish-shell/fish-shell ---- - -# fish -fish is a smart and user-friendly command line shell for Linux, macOS, and the rest of the family. - -## Usage -### Abbreviations -To avoid needless typing, a frequently-run command like `git checkout` can be abbreviated to `gco` using the `abbr` command. - -``` -abbr -a gco git checkout -``` - -After entering `gco` and pressing space or enter, a `gco` in command position will turn into `git checkout` in the command line. If you want to use a literal `gco` sometimes, use `ctrl-space`. - -Abbreviations are a lot more powerful than just replacing literal strings. For example you can make going up a number of directories easier with this: - -```fish -function multicd - echo cd (string repeat -n (math (string length -- $argv[1]) - 1) ../) -end -abbr --add dotdot --regex '^\.\.+$' --function multicd -``` - -Now, `..` transforms to `cd ../`, while `...` turns into `cd ../../` and `....` expands to `cd ../../../`. - -The advantage over aliases is that you can see the actual command before using it, add to it or change it, and the actual command will be stored in history. - -### Custom bindings -In addition to the standard bindings listed here, you can also define your own with `bind`: - -``` -# Just clear the commandline on control-c -bind ctrl-c 'commandline -r ""' -``` - -Put `bind` statements into `config.fish` or a function called `fish_user_key_bindings`. - -If you change your mind on a binding and want to go back to fish’s default, you can simply erase it again: - -``` -bind --erase ctrl-c -``` - -### History -After a command has been executed, it is remembered in the history list. Any duplicate history items are automatically removed. By pressing the up and down keys, you can search forwards and backwards in the history. If the current command line is not empty when starting a history search, only the commands containing the string entered into the command line are shown. - -By pressing `alt-up` (`↑`) and `alt-down` (`↓`), a history search is also performed, but instead of searching for a complete commandline, each commandline is broken into separate elements just like it would be before execution, and the history is searched for an element matching that under the cursor. - -For more complicated searches, you can press `ctrl-r` to open a pager that allows you to search the history. It shows a limited number of entries in one page, press `ctrl-r` again to move to the next page and `ctrl-s` to move to the previous page. You can change the text to refine your search. - -History searches are case-insensitive unless the search string contains an uppercase character. You can stop a search to edit your search string by pressing `escape` or `pagedown`. - -Prefixing the commandline with a space will prevent the entire line from being stored in the history. It will still be available for recall until the next command is executed, but will not be stored on disk. This is to allow you to fix misspellings and such. - -The command history is stored in the file `~/.local/share/fish/fish_history` (or `$XDG_DATA_HOME/fish/fish_history` if that variable is set) by default. However, you can set the `fish_history` environment variable to change the name of the history session (resulting in a `_history` file); both before starting the shell and while the shell is running. - -See the `history` command for other manipulations. - -#### Private mode -Fish has a private mode, in which command history will not be written to the history file on disk. To enable it, either set `$fish_private_mode` to a non-empty value, or launch with `fish --private` (or `fish -P` for short). - -If you launch fish with `-P`, it both hides old history and prevents writing history to disk. This is useful to avoid leaking personal information (e.g. for screencasts) or when dealing with sensitive information. - -You can query the variable `fish_private_mode (if test -n "$fish_private_mode" ...)` if you would like to respect the user’s wish for privacy and alter the behavior of your own fish scripts. - -### Directory History -Navigating directories is usually done with the `cd` command, but fish offers some advanced features as well. - -The current working directory can be displayed with the `pwd` command, or the `$PWD` special variable. Usually your prompt already does this. - -Fish automatically keeps a trail of the recent visited directories with `cd` by storing this history in the `dirprev` and `dirnext` variables. - -Several commands are provided to interact with this directory history: - -- `dirh` prints the history -- `cdh` displays a prompt to quickly navigate the history -- `prevd` moves backward through the history. It is bound to `alt-left` (`←`) -- `nextd` moves forward through the history. It is bound to `alt-right` (`→`) - -## Configuration -To store configuration write it to a file called `~/.config/fish/config.fish`. - -`.fish` scripts in `~/.config/fish/conf.d/` are also automatically executed before `config.fish`. - -These files are read on the startup of every shell, whether interactive and/or if they’re login shells. Use `status --is-interactive` and `status --is-login` to do things only in interactive/login shells, respectively. - -## Shell Scripting -### Shebang -Because shell scripts are written in many different languages, they need to carry information about which interpreter should be used to execute them. For this, they are expected to have a first line, the shebang line, which names the interpreter executable. - -A script written in **bash** would need a first line like this: - -``` -#!/bin/bash -``` - -When the shell tells the kernel to execute the file, it will use the interpreter `/bin/bash`. - -For a script written in another language, just replace `/bin/bash` with the interpreter for that language. For example: `/usr/bin/python` for a python script, or `/usr/local/bin/fish` for a fish script, if that is where you have them installed. - -If you want to share your script with others, you might want to use **env** to allow for the interpreter to be installed in other locations. For example: - -``` -#!/usr/bin/env fish -echo Hello from fish $version -``` - -This will call `env`, which then goes through [`PATH`](https://fishshell.com/docs/current/language.html#envvar-PATH) to find a program called “fish”. This makes it work, whether fish is installed in (for example) `/usr/local/bin/fish`, `/usr/bin/fish`, or `~/.local/bin/fish`, as long as that directory is in [`PATH`](https://fishshell.com/docs/current/language.html#envvar-PATH). - -The shebang line is only used when scripts are executed without specifying the interpreter. For functions inside fish or when executing a script with `fish /path/to/script`, a shebang is not required (but it doesn’t hurt!). - -When executing files without an interpreter, fish, like other shells, tries your system shell, typically `/bin/sh`. This is needed because some scripts are shipped without a shebang line. - -### Variables -In Fish, variables are assigned using the `set` command: - -```fish -set name "Alice" -set -g global_var "I'm global" -set -x PATH $PATH /custom/bin # export variable to child processes -``` - -* `-g`: Sets a global variable. -* `-x`: Exports the variable. -* Arrays are space-separated: - -```fish -set colors red green blue -echo $colors[1] # Outputs: red -``` - -### Conditionals - -Fish uses `if`, `else if`, and `else`: - -```fish -set age 20 - -if test $age -ge 18 - echo "You're an adult" -else if test $age -ge 13 - echo "You're a teenager" -else - echo "You're a child" -end -``` - -#### Switch Statements - -Use `switch` for cleaner branching with string values: - -```fish -set lang "rust" - -switch $lang - case rust - echo "You're using Rust!" - case python - echo "Python is cool too." - case '*' - echo "Unknown language" -end -``` - -### Loops - -#### `for` Loop - -```fish -for color in red green blue - echo $color -end -``` - -#### `while` Loop - -```fish -set count 1 -while test $count -le 3 - echo "Count: $count" - set count (math $count + 1) -end -``` - -### Functions - -Define reusable blocks of code with `function`: - -```fish -function greet - echo "Hello, $argv" -end - -greet "World" # Output: Hello, World -``` - -* `$argv` holds all passed arguments. -* `$argv[1]` is the first argument. - -#### Returning Values - -Functions can return more than just a status code. They can return actual output: - -```fish -function get_username - echo "alice" -end - -set user (get_username) -echo $user # Outputs: alice -``` - -For status codes, use `return`: - -```fish -function is_even - if test (math "$argv[1] % 2") -eq 0 - return 0 - else - return 1 - end -end -``` - -#### Events - -Fish supports event-driven scripting using `functions --on-event`: - -```fish -function notify_start --on-event fish_prompt - echo "Shell is ready!" -end -``` - -Events can be fired with the `emit` command, and do not have to be defined before. The names just need to match. For example: - -```fish -function handler --on-event imdone - echo generator is done $argv -end - -function generator - sleep 1 - # The "imdone" is the name of the event - # the rest is the arguments to pass to the handler - emit imdone with $argv -end -``` - -### Tools -Builtins to do a task, like - -- `cd` to change the current directory. -- `echo` or `printf` to produce output. -- `set_color` to colorize output. -- `set` to set, query or erase variables. -- `read` to read input. -- `string` for string manipulation. -- `path` for filtering paths and handling their components. -- `math` does arithmetic. -- `argparse` to make arguments easier to handle. -- `count` to count arguments. -- `type` to find out what sort of thing (command, builtin or function) fish would call, or if it exists at all. -- `test` checks conditions like if a file exists or a string is empty. -- `contains` to see if a list contains an entry. -- `eval` and `source` to run fish code from a string or file. -- `status` to get shell information, like whether it’s interactive or a login shell, or which file it is currently running. -- `abbr` manages Abbreviations. -- `bind` to change bindings. -- `complete` manages completions. -- `commandline` to get or change the commandline contents. -- `fish_config` to easily change fish’s configuration, like the prompt or colorscheme. -- `random` to generate random numbers or pick from a list. diff --git a/technology/applications/cli/intermodal.md b/technology/applications/cli/intermodal.md index 14dc5b8..8230bb5 100644 --- a/technology/applications/cli/intermodal.md +++ b/technology/applications/cli/intermodal.md @@ -1,71 +1,38 @@ --- obj: application repo: https://github.com/casey/intermodal -website: https://imdl.io -rev: 2025-01-28 --- # Intermodal +[Repo](https://github.com/casey/intermodal) Intermodal is a user-friendly and featureful command-line [BitTorrent](../../internet/BitTorrent.md) metainfo utility. The binary is called `imdl` and runs on [Linux](../../linux/Linux.md), [Windows](../../windows/Windows.md), and [macOS](../../macos/macOS.md). ## Usage ### Create torrent file: ```shell -imdl torrent create [OPTIONS] +imdl torrent create file ``` -| Option | Description | -| -------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `-F, --follow-symlinks` | Follow symlinks in torrent input (default: no) | -| `-f, --force` | Overwrite destination `.torrent` file if it exists | -| `--ignore` | Skip files listed in `.gitignore`, `.ignore`, `.git/info/exclude`, and `git config --get core.excludesFile` | -| `-h, --include-hidden` | Include hidden files that would otherwise be skipped | -| `-j, --include-junk` | Include junk files that would otherwise be skipped | -| `-M, --md5` | Include MD5 checksum of each file in the torrent ( warning: MD5 is broken) | -| `--no-created-by` | Do not populate `created by` key with imdl version information | -| `--no-creation-date` | Do not populate `creation date` key with current time | -| `-O, --open` | Open `.torrent` file after creation (uses platform-specific opener) | -| `--link` | Print created torrent `magnet:` URL to standard output | -| `-P, --private` | Set private flag, restricting peer discovery | -| `-S, --show` | Display information about the created torrent file | -| `-V, --version` | Print version number | -| `-A, --allow ` | Allow specific lint (e.g., `small-piece-length`, `private-trackerless`) | -| `-a, --announce ` | Use primary tracker announce URL for the torrent | -| `-t, --announce-tier ` | Add tiered tracker announce URLs to the torrent metadata, separate their announce URLs with commas. | -| `-c, --comment ` | Set comment text in the generated `.torrent` file | -| `--node ` | Add DHT bootstrap node to the torrent for peer discovery | -| `-g, --glob ` | Include or exclude files matching specific glob patterns | -| `-i, --input ` | Read contents from input source (file, dir, or standard input) | -| `-N, --name ` | Set name of the encoded magnet link to specific text | -| `-o, --output ` | Save `.torrent` file to specified target or print to output | -| `--peer ` | Add peer specification to the generated magnet link | -| `-p, --piece-length ` | Set piece length for encoding torrent metadata | -| `--sort-by ` | Determine order of files within the encoded torrent (path, size, or both) | -| `-s, --source ` | Set source field in encoded torrent metadata to specific text | -| `--update-url ` | Set URL where revised version of metainfo can be downloaded | +Flags: +```shell +-N, --name Set name of torrent +-i, --input Torrent Files +-c, --comment Torrent Comment +-a, --announce Torrent Tracker +``` ### Show torrent information ```shell imdl torrent show ``` -You can output the information as JSON using `--json`. - ### Verify torrent ```shell imdl torrent verify imdl torrent verify --input torr.torrent --content file ``` -### Magnet Links +### Generate magnet link ```shell -# Get magnet link from torrent file -imdl torrent link [-s, --select-only ...] -# Select files to download. Values are indices into the `info.files` list, e.g. `--select-only 1,2,3`. - -# Get torrent file from magnet link -imdl torrent from-link [-o, --output ] - -# Announce a torrent -imdl torrent announce -``` +imdl torrent link +``` \ No newline at end of file diff --git a/technology/applications/cli/kondo.md b/technology/applications/cli/kondo.md deleted file mode 100644 index 0bcf5ab..0000000 --- a/technology/applications/cli/kondo.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -obj: application -repo: https://github.com/tbillington/kondo -rev: 2025-01-28 ---- - -# Kondo 🧹 -Cleans `node_modules`, `target`, `build`, and friends from your projects. - -Excellent if -- 💾 You want to back up your code but don't want to include GBs of dependencies -- 🧑‍🎨 You try out lots of projects but hate how much space they occupy -- ⚡️ You like keeping your disks lean and zippy - -## Usage -Kondo recursively cleans project directories. - -Supported project types: Cargo, Node, Unity, SBT, Haskell Stack, Maven, Unreal Engine, Jupyter Notebook, Python, Jupyter Notebooks, CMake, Composer, Pub, Elixir, Swift, Gradle, and .NET projects. - -Usage: `kondo [OPTIONS] [DIRS]...` - -| Option | Description | -| ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `-I, --ignored-dirs ` | Directories to ignore. Will also prevent recursive traversal within | -| `-q, --quiet...` | Quiet mode. Won't output to the terminal. `-qq` prevents all output | -| `-a, --all` | Clean all found projects without confirmation | -| `-L, --follow-symlinks` | Follow symbolic links | -| `-s, --same-filesystem` | Restrict directory traversal to the root filesystem | -| `-o, --older ` | Only directories with a file last modified n units of time ago will be looked at. Ex: 20d. Units are m: minutes, h: hours, d: days, w: weeks, M: months and y: years | diff --git a/technology/applications/cli/mhost.md b/technology/applications/cli/mhost.md deleted file mode 100644 index a070292..0000000 --- a/technology/applications/cli/mhost.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -obj: application -repo: https://github.com/lukaspustina/mhost -website: https://mhost.pustina.de -rev: 2025-01-30 ---- - -# mhost -A modern take on the classic host DNS lookup utility including an easy to use and very fast Rust lookup library. - -## Use Cases -### Just lookup an IP address -```shell -$ mhost l github.com -``` - -### Just lookup an IP address, using even more than just your local name servers -```shell -$ mhost server-lists public-dns -o servers.txt -$ mhost --limit 6000 --max-concurrent-servers 1000 --timeout 1 -f servers.txt l www.github.com -``` - -The first command downloads a list of public available name servers that are maintained by the Public DNS community. Usually only a subset of these are reachable, but it still a large set of active name servers. - -The second command uses the name servers list from before and queries all of them concurrently. These settings are very aggressive and highly stresses your internet connection. mhost default settings are set much more cautiously. - -### Just lookup an IP address, using UDP, TCP, DoT, and DoH -```shell -$ mhost -s 1.1.1.1 -s tcp:1.1.1.1 -s tls:1.1.1.1:853,tls_auth_name=cloudflare-dns.com -s https:1.1.1.1:443,tls_auth_name=cloudflare-dns.com,name=Cloudflare -p l github.com -``` - -As already mentioned before, mhost supports DNS queries over UDP, TCP, DNS over TLS (DoT), as well as DNS over HTTPS (DoH). In the above example, mhost uses all four protocols to query Cloudflare’s name servers. - -This command also shows the syntax for name server specification, which in general is `protocol::port,tls_auth_name=hostname,name=human-readable-name`. - -### Discover a domain -Sometimes you want to know which host names and subdomains a domain has. mhost offers a simple command to help you find these. Please mind, that mhost only uses DNS specific discovery methods. If you want even deeper discoveries using Google, Shodan etc. there are other tools available. - -```shell -$ mhost -p d github.com -p -``` - -This command uses the predefined name servers to discover the GitHub domain. The `-s` reduces all discovered names to real subdomains of github.com.. - -### You can go one more step and explore the autonomous systems GitHub uses. In order to discover those, you can use the following commands: - -```shell -$ mhost -p l --all -w github.com -$ mhost -p l --all 140.82.121.0/24 -``` - -### Check your name server configuration -```shell -$ mhost -p c github.com -p -``` - -## Usage -mhost has three main commands: `lookup`, `discover`, and `check`. `lookup` lookups up arbitrary DNS records of a domain name. `discover` tries various methods to discover host names and subdomains of a domain. `check` uses lints to check if all records of a domain name adhere to the DNS RFC. - -### General Options - -| Option | Description | -| ------------------------------------------ | -------------------------------------------------------------------------------------------------- | -| `-use-system-resolv-opt` | Uses options set in `/etc/resolv.conf` | -| `-no-system-nameservers` | Ignores nameservers from `/etc/resolv.conf` | -| `-S, --no-system-lookups` | Ignores system nameservers for lookups | -| `--resolv-conf ` | Uses alternative resolv.conf file | -| `--ndots ` | Sets number of dots to qualify domain name as FQDN [default: 1] | -| `--search-domain ` | Sets the search domain to append if HOSTNAME has less than `ndots` dots | -| `--system-nameserver ...` | Adds system nameserver for system lookups; only IP addresses allowed | -| `-s, --nameserver ...` | Adds nameserver for lookups | -| `-p, --predefined` | Adds predefined nameservers for lookups | -| `--predefined-filter ` | Filters predefined nameservers by protocol [default: udp] [possible values: udp, tcp, https, tls] | -| `--list-predefined` | Lists all predefined nameservers | -| `-f, --nameservers-from-file ` | Adds nameservers from file | -| `--limit ` | Sets max. number of nameservers to query [default: 100] | -| `--max-concurrent-servers ` | Sets max. concurrent nameservers [default: 10] | -| `--max-concurrent-requests ` | Sets max. concurrent requests per nameserver [default: 5] | -| `--retries ` | Sets number of retries if first lookup to nameserver fails [default: 0] | -| `--timeout ` | Sets timeout in seconds for responses [default: 5] | -| `-m, --resolvers-mode ` | Sets resolvers lookup mode [default: multi] [possible values: multi, uni] | -| `--wait-multiple-responses` | Waits until timeout for additional responses from nameservers | -| `--no-abort-on-error` | Sets do-not-ignore errors from nameservers | -| `--no-abort-on-timeout` | Sets do-not-ignore timeouts from nameservers | -| `--no-aborts` | Sets do-not-ignore errors and timeouts from nameservers | -| `-o, --output ` | Sets the output format for result presentation [default: summary] [possible values: json, summary] | -| `--output-options ` | Sets output options | -| `--show-errors` | Shows error counts | -| `-q, --quiet` | Does not print anything but results | -| `--no-color` | Disables colorful output | -| `--ascii` | Uses only ASCII compatible characters for output | - -### Lookup Options - -| Option | Description | -| -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `--all` | Enables lookups for all record types | -| `-s`, `--service` | Parses ARG as service spec and set record type to SRV | -| `-w`, `--whois` | Retrieves Whois information about A, AAAA, and PTR records | -| `-h`, `--help` | Prints help information | -| `-t`, `--record-type ...` | Sets record type to lookup, will be ignored in case of IP address lookup [default: A,AAAA,CNAME,MX] [possible values: A, AAAA, ANAME, ANY, CNAME, MX, NULL, NS, PTR, SOA, SRV, TXT] | - -### Discover Options - -```markdown -| Option | Description | -| ----------------------------------- | ------------------------------------------------------------------------------------------ | -| `-p`, `--show-partial-results` | Shows results after each lookup step | -| `-w`, `--wordlist-from-file ` | Uses wordlist from file | -| `--rnd-names-number ` | Sets number of random domain names to generate for wildcard resolution check [default: 3] | -| `--rnd-names-len ` | Sets length of random domain names to generate for wildcard resolution check [default: 32] | -| `-s`, `--subdomains-only` | Shows subdomains only omitting all other discovered names | - -### Check Options - -| Option | Description | -| ----------------------------- | ------------------------------------------- | -| `--show-partial-results` | Shows results after each check step | -| `--show-intermediate-lookups` | Shows all lookups made during by all checks | -| `--no-cnames` | Does not run cname lints | -| `--no-soa` | Does not run SOA check | -| `--no-spf` | Does not run SPF check | diff --git a/technology/applications/cli/names.md b/technology/applications/cli/names.md deleted file mode 100644 index 9270ae2..0000000 --- a/technology/applications/cli/names.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -obj: application -repo: https://github.com/fnichol/names -rev: 2025-01-28 ---- - -# names -Random name generator for Rust - -## Usage - -``` -> names -selfish-change -``` - -Usage: `names [-n, --number] ` diff --git a/technology/applications/cli/qrtool.md b/technology/applications/cli/qrtool.md deleted file mode 100644 index 3ed9b6f..0000000 --- a/technology/applications/cli/qrtool.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -obj: application -repo: https://github.com/sorairolake/qrtool -rev: 2025-01-30 ---- - -# qrtool -qrtool is a command-line utility for encoding or decoding QR code. - -## Usage -### Encode -Usage: `qrtool encode [OPTION]…​ [STRING]` - -| Option | Description | -| ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `-o, --output FILE` | Output the result to a file. | -| `-r, --read-from FILE` | Read input data from a file. This option conflicts with `[STRING]`. | -| `-s, --size NUMBER` | The module size in pixels. If this option is not specified, the module size is 8 when the output format is PNG or SVG, and 1 otherwise. | -| `-l, --error-correction-level LEVEL` | Error correction level. The possible values are: Level `L`. 7% of codewords can be restored. Level `M`. 15% of codewords can be restored. This is the default value. Level `Q`. 25% of codewords can be restored. Level `H`. 30% of codewords can be restored. | -| `--level LEVEL` | Alias for `-l, --error-correction-level`. | -| `-m, --margin NUMBER` | The width of margin. If this option is not specified, the margin will be 4 for normal QR code and 2 for Micro QR code. | -| `-t, --type FORMAT` | The format of the output. The possible values are: `png`, `svg`, `pic`, `ansi256`, `ansi-true-color`, `ascii`, `ascii-invert`, `unicode`, `unicode-invert` | -| `--foreground COLOR` | Foreground color. COLOR takes a CSS color string. Colored output is only available when the output format is PNG, SVG or any ANSI escape sequences. Note that lossy conversion may be performed depending on the color space supported by the method to specify a color, the color depth supported by the output format, etc. Default is black. | -| `--background COLOR` | Background color. COLOR takes a CSS color string. Colored output is only available when the output format is PNG, SVG or any ANSI escape sequences. Note that lossy conversion may be performed depending on the color space supported by the method to specify a color, the color depth supported by the output format, etc. Default is white. | - -### Decode -Usage: `qrtool decode [OPTION]…​ [IMAGE]` - -| Option | Description | -| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `-t, --type FORMAT` | The format of the input. If FORMAT is not specified, the format is determined based on the extension or the magic number. The possible values are: `bmp`, `dds`, `farbfeld`, `gif`, `hdr`, `ico`, `jpeg`, `openexr`, `png`, `pnm`, `qoi`, `svg`, `tga`, `tiff`, `webp`, `xbm` | diff --git a/technology/applications/cli/refold.md b/technology/applications/cli/refold.md deleted file mode 100644 index 862ffaa..0000000 --- a/technology/applications/cli/refold.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -obj: application -repo: https://github.com/wr7/refold -rev: 2025-01-30 ---- - -# refold -refold is a commandline tool for performing text-wrapping, similar to unix `fold`. Unlike `fold`, refold will recombine lines before performing line-wrapping, and it will automatically detect line prefixes. - -## Usage -Usage: `refold [FLAGS...]` - -refold reads from stdin and writes to stdout - -### Options - -| Option | Description | -| ------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------- | -| `--width, -w ` | Sets the width to wrap at (default 80). | -| `--prefix, -p ` | Sets the prefix for each line (default: auto detect). Set to an empty string to disable prefixing entirely. | -| `--boundaries, -b, --unicode-boundaries` | Sets the split mode to "boundaries" mode (default). In boundaries mode, line wrapping may occur in-between unicode breakable characters. | -| `--spaces, -s` | Sets the split mode to "space" mode. In space mode, line wrapping may occur in-between words separated by ASCII spaces. | -| `--characters, -c, --break-words, --break` | Sets the split mode to "character" mode. In character mode, line wrapping may occur in-between any two characters. | diff --git a/technology/applications/cli/rexturl.md b/technology/applications/cli/rexturl.md deleted file mode 100644 index 60112a7..0000000 --- a/technology/applications/cli/rexturl.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -obj: application -repo: https://github.com/vschwaberow/rexturl -rev: 2025-01-30 ---- - -# rexturl -A versatile command-line tool for parsing and manipulating URLs. - -## Usage -Usage: `rexturl [OPTIONS] [URLS...]` - -If no URLs are provided, rexturl will read from stdin. - -### Options - -| Option | Description | -| ------------------- | --------------------------------------------------------- | -| `--urls ` | Input URLs to process | -| `--scheme` | Extract and display the URL scheme | -| `--username` | Extract and display the username from the URL | -| `--host` | Extract and display the hostname | -| `--port` | Extract and display the port number | -| `--path` | Extract and display the URL path | -| `--query` | Extract and display the query string | -| `--fragment` | Extract and display the URL fragment | -| `--sort` | Sort the output | -| `--unique` | Remove duplicate entries from the output | -| `--json` | Output results in JSON format | -| `--all` | Display all URL components | -| `--custom` | Enable custom output mode | -| `--format ` | Custom output format [default: `{scheme}://{host}{path}`] | -| '--domain' | Extract and display the domain | - - -### Custom Output Format -When using `--custom` and `--format`, you can use the following placeholders: -- `{scheme}` -- `{username}` -- `{host}` -- `{domain}` -- `{port}` -- `{path}` -- `{query}` -- `{fragment}` diff --git a/technology/applications/cli/rnr.md b/technology/applications/cli/rnr.md index 6b91c67..b457b68 100644 --- a/technology/applications/cli/rnr.md +++ b/technology/applications/cli/rnr.md @@ -1,101 +1,20 @@ --- obj: application repo: https://github.com/ismaelgv/rnr -rev: 2025-05-19 --- # rnr -RnR is a command-line tool to rename multiple files and directories that supports regular expressions. +[Repo](https://github.com/ismaelgv/rnr) +**RnR** is a command-line tool to **securely rename** multiple files and directories that supports regular expressions. ## Usage -Usage: `rnr ` - -Commands: -- `regex`: Rename files and directories using a regular expression -- `from-file`: Read operations from a dump file -- `to-ascii`: Replace file name UTF-8 chars with ASCII chars representation - -### regex -``` -Rename files and directories using a regular expression - -Usage: rnr regex [OPTIONS] ... - -Arguments: - Expression to match (can be a regex) - Expression replacement (use single quotes for capture groups) - ... Target paths - -Options: - -n, --dry-run - Only show what would be done (default mode) - -f, --force - Make actual changes to files - -b, --backup - Generate file backups before renaming - -s, --silent - Do not print any information - --color - Set color output mode [default: auto] [possible values: always, never, auto] - --dump - Force dumping operations into a file even in dry-run mode - --dump-prefix - Set the dump file prefix [default: rnr-] - --no-dump - Do not dump operations into a file - -l, --replace-limit - Limit of replacements, all matches if set to 0 - -t, --replace-transform - Apply a transformation to replacements including captured groups [possible values: upper, lower, ascii] - -D, --include-dirs - Rename matching directories - -r, --recursive - Recursive mode - -d, --max-depth - Set max depth in recursive mode - -x, --hidden - Include hidden files and directories -``` - -### from-file -``` -Read operations from a dump file - -Usage: rnr from-file [OPTIONS] - -Arguments: - - -Options: - -n, --dry-run Only show what would be done (default mode) - -f, --force Make actual changes to files - -b, --backup Generate file backups before renaming - -s, --silent Do not print any information - --color Set color output mode [default: auto] [possible values: always, never, auto] - --dump Force dumping operations into a file even in dry-run mode - --dump-prefix Set the dump file prefix [default: rnr-] - --no-dump Do not dump operations into a file - -u, --undo Undo the operations from the dump file -``` - -### to-ascii -``` -Usage: rnr to-ascii [OPTIONS] ... - -Arguments: - ... Target paths - -Options: - -n, --dry-run Only show what would be done (default mode) - -f, --force Make actual changes to files - -b, --backup Generate file backups before renaming - -s, --silent Do not print any information - --color Set color output mode [default: auto] [possible values: always, never, auto] - --dump Force dumping operations into a file even in dry-run mode - --dump-prefix Set the dump file prefix [default: rnr-] - --no-dump Do not dump operations into a file - -D, --include-dirs Rename matching directories - -r, --recursive Recursive mode - -d, --max-depth Set max depth in recursive mode - -x, --hidden Include hidden files and directories -``` +Flags +```shell +-n, --dry-run Only show what would be done (default mode) +-f, --force Make actual changes to files +-x, --hidden Include hidden files and directories +-D, --include-dirs Rename matching directories +-r, --recursive Recursive mode +-s, --silent Do not print any information +--no-dump Do not dump operations into a file +``` \ No newline at end of file diff --git a/technology/applications/cli/skate.md b/technology/applications/cli/skate.md deleted file mode 100644 index 5720389..0000000 --- a/technology/applications/cli/skate.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -obj: application -repo: https://github.com/charmbracelet/skate ---- - -# 🛼 skate -A personal key-value store. - -![Image](./skate.png) - -## Usage -Usage: `skate [command]` - -### KeyValues -Set a value for a key with an optional `@` db. If `VALUE` is omitted, read value from the standard input: -```sh -# Usage: skate set KEY[@DB] [VALUE] [flags] - -skate set foo@mydb bar -skate set foo < ./bar.txt -``` - -Get a value for a key with an optional `@` db: -```shell -# Usage: skate get KEY[@DB] -skate get foo@mydb -``` - -Delete a key with an optional `@` db: -```shell -# Usage: skate delete KEY[@DB] -skate delete foo@mydb -``` - -List key value pairs with an optional `@` db: -```shell -# Usage: skate list [@DB] [flags] - -# Options: -# -d, --delimiter string delimiter to separate keys and values (default "\t") -# -k, --keys-only only print keys and don't fetch values from the db -# -r, --reverse list in reverse lexicographic order -# -b, --show-binary print binary values -# -v, --values-only only print values - -skate list @mydb -``` - -### Databases -List databases: -```shell -skate list-dbs -``` - -Delete a database: -```shell -skate delete-db @mydb -``` diff --git a/technology/applications/cli/skate.png b/technology/applications/cli/skate.png deleted file mode 100644 index 04996a9..0000000 Binary files a/technology/applications/cli/skate.png and /dev/null differ diff --git a/technology/applications/cli/starship.md b/technology/applications/cli/starship.md deleted file mode 100644 index 281f43d..0000000 --- a/technology/applications/cli/starship.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -obj: application -website: https://starship.rs -repo: https://github.com/starship/starship -rev: 2025-05-27 ---- - -# 🚀 Starship -The minimal, blazing-fast, and infinitely customizable prompt for any shell! - -## Setup -Install starship and add the following to your shells configuration: - -```sh -# For bash -eval "$(starship init bash)" -# For zsh -eval "$(starship init zsh)" -# For fish -starship init fish | source -``` - -## Configuration -Your shell prompt is build using modules showing relevant information. -You can customize these at `~/.config/starship.toml`. All configuration for starship is done in this TOML file. -See [this page](https://starship.rs/config/) for an overview of every configurable module. diff --git a/technology/applications/cli/tagctl.md b/technology/applications/cli/tagctl.md deleted file mode 100644 index d18c7e4..0000000 --- a/technology/applications/cli/tagctl.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -obj: application -repo: https://gitlab.com/KodyVB/tagctl -rev: 2025-01-30 ---- - -# tagctl -Tagctl is a command line program which can add or remove tags to files. -The tags can either be in the name or under `user.xdg.tags` in the extended attributes. - -## Usage -Usage: `tagctl [OPTIONS] [FILES]...` - -| Option | Description | -| ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `-t, --tag ` | Tag to add/remove to selected files. `%p` uses the parent directory name, `%y` uses the modified year, `%m` uses modified month, `%d` uses modified day, and `%w` uses modified weekday | -| `-d, --delimiter ` | Separator for multiple tags (default: `,`) | -| `-i, --input` | Accepts input from stdin | -| `-x, --xattr` | Adds/removes tags via xattr under `user.xdg.tags` | -| `-r, --remove` | Removes tag instead of adding | -| `-R, --remove_all` | Removes all tags | -| `-v, --verbose` | Increases verbosity of output | -| `-g, --generate_autocomplete ` | The shell to generate auto-completion for `bash`, `elvish`, `fish`, `zsh` | - - -## Examples -**Add tag `example` to current directory using file names:** -```shell -tagctl -t example "$(ls)" -ls | tagctl --input --tag example -``` - -**Remove tag `example` from current directory using file names:** -```shell -tagctl -r --tag=example "$(ls)" -ls | tagctl --remove -it example -``` - -**Add tag `example` to current directory using extended attributes:** -```shell -tagctl -xt example "$(ls)" -ls | tagctl --xattr --input --tag example -``` - -**Remove tag `example` from current directory using extended attributes:** -```shell -tagctl -xr --tag=example "$(ls)" -ls | tagctl --xattr --remove -it example -``` - -**Add tag `example` to two sets of inputs using file names:** -```shell -find /home/user/Documents | tagctl -it "example" "$(ls)" -``` diff --git a/technology/applications/cli/timr-tui.md b/technology/applications/cli/timr-tui.md deleted file mode 100644 index a4d4acc..0000000 --- a/technology/applications/cli/timr-tui.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -obj: application -repo: https://github.com/sectore/timr-tui -rev: 2025-01-31 ---- - -# timr-tui -TUI to organize your time: Pomodoro, Countdown, Timer. - -## CLI -Usage: `timr-tui [OPTIONS]` - -| Option | Description | -| -------- | ----------------------------------------------------------------------------------------------- | -| `–c` | Countdown time to start from. Formats: 'ss', 'mm:ss', or 'hh:mm:ss' | -| `–w` | Work time to count down from. Formats: 'ss', 'm:ss', or 'h:mm:s' | -| `–p` | Pause time to count down from. Formats: 'ss', 'm:ss', or 'h:m:s' | -| `–d` | Show deciseconds | -| `–m` | Mode to start with. [possible values: countdown, timer, pomodoro] | -| `–s` | Style to display time with. [possible values: full, light, medium, dark, thick, cross, braille] | -| `--menu` | Open the menu | -| `–r` | Reset stored values to default values. | -| `–n` | Toggle desktop notifications on or off. Experimental. [possible values: on, off] | diff --git a/technology/applications/cli/unionfarm.md b/technology/applications/cli/unionfarm.md deleted file mode 100644 index 9ec3858..0000000 --- a/technology/applications/cli/unionfarm.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -obj: application -repo: https://codeberg.org/chrysn/unionfarm -rev: 2025-01-30 ---- - -# unionfarm -This is a small utility for managing symlink farms. It takes a "farm" directory and any number of "data" directories, and creates (or updates) the union (or overlay) of the data directories in the farm directory by placing symlinks to data directories. - -It is similar to -- union mounts (overlay/overlayfs) -- but works without system privileges; it is not live, but can then again err out on duplicate files rather than picking the highest ranking - -Usage: `unionfarm [DATA]...` - -## Example - -``` -$ tree my-photos -my-photos -├── 2018/ -│ └── Rome/ -│ └── ... -└── 2019/ - └── Helsinki/ - └── DSCN2305.jpg -``` - -Assume you have a collection of photos as above, and want to see them overlaid with a friend's photos: - -``` -$ tree ~friend/photos -/home/friend/photos -├── 2018/ -│ └── Amsterdam/ -│ └── ... -└── 2019/ - └── Helsinki/ - └── DSC_0815.jpg -``` - -With unionfarm, you can create a shared view on them: - -``` -$ unionfarm all-photos my-photos ~friend/photos -$ tree all-photos -all-photos -├── 2018/ -│ ├── Amsterdam -> /home/friend/photos/2018/Amsterdam/ -│ └── Rome -> ../../my-photos/2018/Rome/ -└── 2019/ - └── Helsinki/ - ├── DSC_0815.jpg -> /home/friend/photos/2019/Helsinki/DSC_0815.jpg - └── DSCN2305.jpg -> ../../../my-photos/2019/Helsinki/DSCN2305.jpg -``` diff --git a/technology/applications/cli/xt.md b/technology/applications/cli/xt.md deleted file mode 100644 index f92cc07..0000000 --- a/technology/applications/cli/xt.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -obj: application -repo: https://github.com/ahamlinman/xt -rev: 2025-01-30 ---- - -# xt -xt is a cross-format translator for JSON, MessagePack, TOML, and YAML. - -## Usage -Usage: `xt [-f format] [-t format] [file ...]` - -| Option | Description | -|---|---| -| `-f format` | Skip detection and convert every input from the given format | -| `-t format` | Convert to the given format (default: `json`) | - -## Formats -- `json`, `j`: -- `msgpack`, `m` -- `toml`, `t` -- `yaml`, `y` diff --git a/technology/applications/desktops/spectacle.md b/technology/applications/desktops/spectacle.md deleted file mode 100644 index 06d8b88..0000000 --- a/technology/applications/desktops/spectacle.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -obj: application -repo: https://invent.kde.org/graphics/spectacle -website: https://apps.kde.org/de/spectacle ---- - -# Spectacle -Spectacle is a screenshot taking utility for the KDE desktop. - -## Features -- Screenshot region, windows, displays -- Screenrecord diff --git a/technology/applications/development/Ghidra.md b/technology/applications/development/Ghidra.md index b0a93b8..dbc4122 100644 --- a/technology/applications/development/Ghidra.md +++ b/technology/applications/development/Ghidra.md @@ -5,6 +5,8 @@ repo: https://github.com/NationalSecurityAgency/ghidra rev: 2024-04-15 --- +#refactor + # Ghidra Ghidra is a powerful open-source software reverse engineering (SRE) suite developed by the National Security Agency (NSA) that enables users to analyze compiled code to understand its functionality, vulnerabilities, and inner workings. diff --git a/technology/applications/development/SurrealDB.md b/technology/applications/development/SurrealDB.md deleted file mode 100644 index 8606be9..0000000 --- a/technology/applications/development/SurrealDB.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -obj: application -website: https://surrealdb.com -repo: https://github.com/surrealdb/surrealdb ---- - -# SurrealDB -SurrealDB is a powerful, cloud-native, multi-model database built for modern application development. It supports relational, document, graph, vector, and real-time data access, all via a unified SQL-like query language called SurrealQL. There is also a GUI called Surrealist. - -## Multi-Model Support -- **Relational**: Traditional table structure with foreign key-like linking. -- **Document**: JSON-based records with schema-less flexibility. -- **Graph**: Native support for linked data using edges and nodes. -- **Vector**: Built-in similarity search for AI/ML use cases. -- **Real-time**: Subscriptions and change feeds. -- **Time-Series & Search**: Native support for time-ordered and full-text queries. - -## SurrealQL -SurrealQL blends the familiarity of SQL with document/graph features. - -```sql --- Create a user -CREATE user:john SET name = 'John Doe', email = 'john@example.com'; - --- Read a record -SELECT * FROM user:john; - --- Create a relationship (graph) -RELATE user:john->friend->user:jane; - --- Search by text -SELECT * FROM article WHERE content CONTAINS 'database'; - --- Vector similarity search -SELECT * FROM embeddings WHERE vector <-> [0.1, 0.2, 0.3] LIMIT 3; -``` - -## Compose - -```yml -services: - surrealdb: - ports: - - 80:8000 - volumes: - - /local-dir:/container-dir - image: surrealdb/surrealdb:latest - command: start --user root --pass root rocksdb:/container-dir/mydatabase.db -``` diff --git a/technology/applications/development/delta.md b/technology/applications/development/delta.md deleted file mode 100644 index 220e571..0000000 --- a/technology/applications/development/delta.md +++ /dev/null @@ -1,151 +0,0 @@ ---- -obj: application -website: https://dandavison.github.io/delta/ -repo: https://github.com/dandavison/delta ---- - -# Delta -A syntax-highlighting pager for git, diff, grep, and blame output - -## Get started -Install delta and add this to your `~/.gitconfig`: - -```ini -[core] - pager = delta - -[interactive] - diffFilter = delta --color-only - -[delta] - navigate = true # use n and N to move between diff sections - - # delta detects terminal colors automatically; set one of these to disable auto-detection - # dark = true - # light = true - -[merge] - conflictstyle = zdiff3 -``` - -### Configuration -Delta uses git config (`~/.gitconfig`) for its configuration. - -You do not even need to use git -- delta accepts git diff and unified diff formats and hence works with e.g. mercurial and jujutsu -- but you do need to use the git config format. - -Use `delta --help` to see all the available options. - -To change your delta options in a one-off git command, use `git -c`. For example - -```shell -git -c delta.line-numbers=false show -``` - -## Usage -The main way to use delta is to configure it as the pager for git. - -Delta can also be used as a shorthand for diffing two files, even if they are not in a git repo: the following two commands do the same thing: - -```shell -delta /somewhere/a.txt /somewhere/else/b.txt - -git diff /somewhere/a.txt /somewhere/else/b.txt -``` - -You can also use process substitution shell syntax with delta, e.g. - -```bash -delta <(sort file1) <(sort file2) -``` - -In addition to git output, delta handles standard unified diff format, e.g. `diff -u a.txt b.txt | delta`. - -For Mercurial, you can add delta, with its command line options, to the `[pager]` section of `.hgrc`. - -### Choosing colors (styles) -Delta detects your terminal background color automatically and chooses appropriate default colors. To override automatic detection use dark or light, e.g. - -```ini -[delta] - dark = true -``` - -This is necessary when running delta in some contexts such as lazygit or zellij. - -### Line numbers - -```ini -[delta] - line-numbers = true -``` - -The numbers are displayed in two columns and there are several configuration options: see the `LINE NUMBERS` section in `delta --help` for details. - -### Hyperlinks -Delta uses terminal hyperlinks to turn line numbers, file paths, commit hashes, etc into clickable links, as long as your terminal emulator supports it. Enable the feature with - -```ini -[delta] - hyperlinks = true -``` - -Commit hashes link to GitHub/GitLab/Bitbucket (use `hyperlinks-commit-link-format` for full control). - -The links on line numbers (in grep output, as well as diffs) are particularly interesting: with a little bit of effort, they can be made to open your editor or IDE at the correct line. Use `hyperlinks-file-link-format` to construct the correct URL for your system. For VSCode and JetBrains IDEs this is easy, since they support their own special URL protocols. Here are examples: - -```ini -[delta] - hyperlinks = true - hyperlinks-file-link-format = "vscode://file/{path}:{line}" - # hyperlinks-file-link-format = "idea://open?file={path}&line={line}" - # hyperlinks-file-link-format = "pycharm://open?file={path}&line={line}" -``` - -Zed also supports its own URL protocol, and probably others. - -If your editor does not have its own URL protocol, then there are still many possibilities, although they may be more work. - -The easiest is probably to write a toy HTTP server (e.g. in Python) that opens the links in the way that you need. Then your delta config would look something like - -```ini -[delta] -hyperlinks = true -hyperlinks-file-link-format = "http://localhost:8000/open-in-editor?path={path}&line={line}" -# Now write an HTTP server that handles those requests by opening your editor at the file and line -``` - -### Side-by-side view - -```ini -[delta] - side-by-side = true -``` - -By default, side-by-side view has line-numbers activated, and has syntax highlighting in both the left and right panels. - -### Grep -Delta applies syntax-highlighting and other enhancements to standard grep output such as from ripgrep (aka rg), git grep, grep, etc. If you don't need special features of git grep, then for best results pipe `rg --json` output to delta: this avoids parsing ambiguities that are inevitable with the output of git grep and grep. To customize the colors and syntax highlighting, see the `grep-*` options in `delta --help`. - -Note that git grep can display the "function context" for matches and that delta handles this output specially: see the `-p` and `-W` options of git grep. - -```shell -rg --json -C 2 handle | delta -``` - -With hyperlinks enabled, the line numbers in the grep output will be clickable links. See hyperlinks. - -### Navigation keybindings for large diffs -Use the `navigate` feature to activate navigation keybindings. In this mode, pressing `n` will jump forward to the next file in the diff, and `N` will jump backwards. If you are viewing multiple commits (e.g. via `git log -p`) then navigation will also visit commit boundaries. - -### Merge conflicts -Consider setting `merge.conflictStyle` to `zdiff3`: - -```ini -[merge] - conflictStyle = zdiff3 -``` - -With that setting, when a merge conflict is encountered, Git will display merge conflicts with the contents of the merge base as well. delta will then display this as two diffs, from the ancestor to each side of the conflict: - -### Git blame -Set delta as the pager for blame in the `[pager]` section of your gitconfig. If hyperlinks is enabled in the `[delta]` section then each blame commit will link to the commit on GitHub/GitLab/Bitbucket/etc. diff --git a/technology/applications/development/hl.md b/technology/applications/development/hl.md deleted file mode 100644 index 9ec1abd..0000000 --- a/technology/applications/development/hl.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -obj: application -repo: https://github.com/pamburus/hl ----- - -# hl -High-performance log viewer and processor that transforms logs in JSON and logfmt formats into a human-readable output. Built with efficiency in mind, it enables quick parsing and analysis of large log files with minimal overhead. - -## Usage -Usage: `hl [OPTIONS] [FILE]...` - -| Option | Environment | Description | -| ----------------------------------- | ------------ | ---------------------------------------------------------------------------------------------------- | -| `--config ` | `$HL_CONFIG` | Configuration file path | -| `-s`, `--sort` | | Sort messages chronologically | -| `-F`, `--follow` | | Follow input streams and sort messages chronologically during time frame set by `--sync-interval-ms` | -| `--tail ` | | Number of last messages to preload in `--follow` mode (default: 10) | -| `--sync-interval-ms ` | | Synchronization interval for live streaming (default: 100) | -| `--paging ` | `$HL_PAGING` | Control pager usage (default: auto) [auto, always, never] | -| `-P` | | Alias for `--paging=never`, overrides `--paging` | -| `--help` | | Print help | -| `-V`, `--version` | | Print version | - -### Filtering Options - -| Option | Environment | Description | -| ------------------------- | ----------- | --------------------------------------------------- | -| `-l`, `--level ` | `$HL_LEVEL` | Filter messages by level | -| `--since