> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mirage.strukto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Data

> Query JSON, calculate, encode, checksum and work with archives.

Commands for structured data, encodings, checksums and archives, beside the
[Core Tools](https://docs.mirage.strukto.ai/home/core/tools.md). Expand a command to see every flag it takes;
`man COMMAND` prints its manual.

## JSON and calculations

**jq**

Query and transform a stream of JSON values.

**28 flags**

**-n, --null-input**

Use null as the single input value.

**-R, --raw-input**

Read each line as a string instead of JSON.

**-s, --slurp**

Read all inputs into one array.

**-c, --compact-output**

Compact instead of pretty-printed output.

**-r, --raw-output**

Output strings without quotes or escapes.

**--raw-output0**

Implies -r and writes NUL after each output.

**-j, --join-output**

Implies -r and writes no trailing newline.

**-a, --ascii-output**

Escape non-ASCII characters in output.

**-S, --sort-keys**

Sort object keys on output.

**-e, --exit-status**

Set the exit status from the last output.

**--tab**

Indent with tabs.

**--indent \<text>**

Indent with n spaces (max 7).

**--stream-errors**

Read as --stream does, a parse error as one more event.

**-L, --library-path \<text>**

Add a directory to the module search list.

**-C, --color-output**

Accepted; output stays plain.

**-M, --monochrome-output**

Disable colored output (already the default).

**--unbuffered**

Accepted for compatibility; output is one buffer.

**-f, --from-file \<path>**

Read the filter from a file.

**--stream**

Read each input as its \[path, leaf] events.

**--seq**

Read and write RS-delimited JSON text sequences.

**--arg \<name> \<text>**

Set \$name to a string value.

**--argjson \<name> \<text>**

Set \$name to a JSON value.

**--rawfile \<name> \<path>**

Set \$name to a file's contents.

**--slurpfile \<name> \<path>**

Set \$name to a file's documents, as an array.

**--args**

Read the remaining operands as positional string values.

**--jsonargs**

Read the remaining operands as positional JSON values.

**-h, --help**

Show this help and exit.

**-V, --version**

Show version information and exit.

**bc**

Evaluate numeric expressions.

**2 flags**

**-l, --mathlib**

Load the standard math library.

**-q, --quiet**

Suppress the welcome banner.

**expr**

Evaluate integer and string expressions.

`jq` runs once per JSON value, whether input is JSONL, concatenated documents, or piped output. Use `-s` to collect the stream into an array, and `--arg` / `--argjson` to pass values safely.

**Limits:** `jq -C`, `-L`, `--stream-errors`, and `--build-configuration` are unsupported. Input-consuming programs follow the common `input` / `inputs` patterns; partial drains or multiple conditional reads can differ from jq. Halts inside error handling can also differ.

## Encoding and checksums

**base64**

Encode or decode Base64.

**4 flags**

**-d, --decode**

**-D**

**-w, --wrap \<text>**

**-i, --ignore-garbage**

**iconv**

Convert character encodings.

**6 flags**

**-f, --from-code \<text>**

**-t, --to-code \<text>**

**-c**

**-o, --output \<path>**

**-l, --list**

**-s, --silent**

**xxd**

Create or reverse a hex dump.

**16 flags**

**-r, -revert**

**-p, -ps, -postscript, -plain**

**-l, -len \<text>**

**-c, -cols \<text>**

**-s, -seek \<text>**

**-g, -groupsize \<text>**

**-u, -uppercase**

**-a, -autoskip**

**-b, -bits**

**-C**

**-d, -decimal**

**-E, -EBCDIC**

**-e**

**-i, -include**

**-n, -name \<text>**

**-o, -offset \<text>**

**od**

Dump bytes in a chosen format.

**33 flags**

**-A, --address-radix \<text>**

**-j \<text>**

**--skip-bytes \<text>**

**-N \<text>**

**--read-bytes \<text>**

**-S \<text>**

**--strings\[=\<text>]**

**-t, --format \<text>**

**-v, --output-duplicates**

**-w\[\<text>]**

**--width\[=\<text>]**

**--endian \<text>**

**--traditional**

**-a**

**-b**

**-c**

**-d**

**-f**

**-h**

**-i**

**-l**

**-o**

**-s**

**-x**

**-B**

**-D**

**-e**

**-F**

**-H**

**-I**

**-L**

**-O**

**-X**

**md5**

Print an MD5 digest.

**md5sum, sha1sum, sha224sum, sha256sum, sha384sum, sha512sum**

Generate or verify checksums.

**10 flags**

**-c, --check**

**-b, --binary**

**--tag**

**-t, --text**

**-w, --warn**

**-z, --zero**

**--status**

**--ignore-missing**

**--strict**

**--quiet**

**b2sum**

Generate or verify checksums.

**11 flags**

**-l, --length \<text>**

**-c, --check**

**-b, --binary**

**--tag**

**-t, --text**

**-w, --warn**

**-z, --zero**

**--status**

**--ignore-missing**

**--strict**

**--quiet**

## Archives and compression

**tar**

Create, extract, or list archives.

**38 flags**

**-c, --create**

**-x, --extract**

**-t, --list**

**-r, --append**

**-u, --update**

**--delete**

**-z, --gzip**

**-j, --bzip2**

**-J, --xz**

**-v, --verbose**

**-h, --dereference**

**-O, --to-stdout**

**-a, --auto-compress**

**-k, --keep-old-files**

**--overwrite**

**--skip-old-files**

**-p, --preserve-permissions**

**-P, --absolute-names**

**-m, --touch**

**--numeric-owner**

**--owner \<text>**

**--group \<text>**

**--mtime \<text>**

**--sort \<text>**

**--transform \<text>**

**-T, --files-from \<path>**

**--null**

**-X, --exclude-from \<path>**

**--exclude-vcs**

**--wildcards**

**--no-wildcards**

**--anchored**

**--no-anchored**

**-f, --file \<path>**

**-C, --directory \<path>**

**--strip-components \<text>**

**--exclude \<text>**

**--one-file-system**

**zip**

Create ZIP archives.

**29 flags**

**-r**

**-j**

**-q**

**-X, --no-extra**

**-y**

**-x \<text>**

**-i \<text>**

**-u**

**-f**

**-d**

**-m**

**-T**

**-v**

**-l**

**-D**

**-b \<path>**

**-c**

**-z**

**-@**

**-0**

**-1**

**-2**

**-3**

**-4**

**-5**

**-6**

**-7**

**-8**

**-9**

**unzip**

Extract, inspect, or test ZIP archives.

**24 flags**

**-o**

**-n**

**-l**

**-d \<path>**

**-q**

**-p**

**-t**

**-v**

**-x \<text>**

**-Z**

**-1**

**-2**

**-s**

**-m**

**-h**

**-j**

**-u**

**-f**

**-z**

**-C**

**-a**

**-L**

**-X**

**-U**

**gzip**

Compress or decompress gzip data.

**23 flags**

**-c, --stdout, --to-stdout**

**-d, --decompress, --uncompress**

**-f, --force**

**-k, --keep**

**-l, --list**

**-n, --no-name**

**-N, --name**

**-q, --quiet**

**-r, --recursive**

**-S, --suffix \<text>**

**-t, --test**

**-v, --verbose**

**--rsyncable**

**--synchronous**

**-1, --fast**

**-2**

**-3**

**-4**

**-5**

**-6**

**-7**

**-8**

**-9, --best**

**gunzip**

Decompress or test gzip data.

**23 flags**

**-c, --stdout, --to-stdout**

**-d, --decompress, --uncompress**

**-f, --force**

**-k, --keep**

**-l, --list**

**-n, --no-name**

**-N, --name**

**-q, --quiet**

**-r, --recursive**

**-S, --suffix \<text>**

**-t, --test**

**-v, --verbose**

**--rsyncable**

**--synchronous**

**-1, --fast**

**-2**

**-3**

**-4**

**-5**

**-6**

**-7**

**-8**

**-9, --best**

**zcat**

Read compressed content to stdout.

**23 flags**

**-c, --stdout, --to-stdout**

**-d, --decompress, --uncompress**

**-f, --force**

**-k, --keep**

**-l, --list**

**-n, --no-name**

**-N, --name**

**-q, --quiet**

**-r, --recursive**

**-S, --suffix \<text>**

**-t, --test**

**-v, --verbose**

**--rsyncable**

**--synchronous**

**-1, --fast**

**-2**

**-3**

**-4**

**-5**

**-6**

**-7**

**-8**

**-9, --best**

**zcmp**

Compare compressed files.

**6 flags**

**-l, --verbose**

**-s, --quiet**

**--silent**

**-n, --bytes \<text>**

**-b, --print-bytes**

**-i, --ignore-initial \<text>**

**zdiff**

Compare compressed files.

**37 flags**

**-i, --ignore-case**

**-w, --ignore-all-space**

**-b, --ignore-space-change**

**-E, --ignore-tab-expansion**

**-Z, --ignore-trailing-space**

**-B, --ignore-blank-lines**

**-I, --ignore-matching-lines \<text>**

**--strip-trailing-cr**

**--speed-large-files**

**--horizon-lines \<text>**

**-a, --text**

**--normal**

**-e, --ed**

**-n, --rcs**

**-c**

**-C \<text>**

**--context\[=\<text>]**

**-u**

**-U \<text>**

**--unified\[=\<text>]**

**-y, --side-by-side**

**-W, --width \<text>**

**--left-column**

**--suppress-common-lines**

**-p, --show-c-function**

**-F, --show-function-line \<text>**

**-t, --expand-tabs**

**-T, --initial-tab**

**-L, --label \<text>**

**--color\[=\<text>]**

**-q, --brief**

**-r, --recursive**

**-N, --new-file**

**--unidirectional-new-file**

**-x, --exclude \<text>**

**-X, --exclude-from \<path>**

**-s, --report-identical-files**

**xz**

Compress, decompress, or test `.xz` data.

**23 flags**

**-z, --compress**

**-d, --decompress, --uncompress**

**-t, --test**

**-k, --keep**

**-f, --force**

**-c, --stdout, --to-stdout**

**-q, --quiet**

**-v, --verbose**

**-e, --extreme**

**-0, --fast**

**-1**

**-2**

**-3**

**-4**

**-5**

**-6**

**-7**

**-8**

**-9, --best**

**-T, --threads \<text>**

**-C, --check \<text>**

**-F, --format \<text>**

**-S, --suffix \<text>**

**unxz**

Compress, decompress, or test `.xz` data.

**23 flags**

**-z, --compress**

**-d, --decompress, --uncompress**

**-t, --test**

**-k, --keep**

**-f, --force**

**-c, --stdout, --to-stdout**

**-q, --quiet**

**-v, --verbose**

**-e, --extreme**

**-0, --fast**

**-1**

**-2**

**-3**

**-4**

**-5**

**-6**

**-7**

**-8**

**-9, --best**

**-T, --threads \<text>**

**-C, --check \<text>**

**-F, --format \<text>**

**-S, --suffix \<text>**

**bzip2**

Compress, decompress, or test `.bz2` data.

**21 flags**

**-z, --compress**

**-d, --decompress**

**-t, --test**

**-k, --keep**

**-f, --force**

**-c, --stdout**

**-q, --quiet**

**-v, --verbose**

**-s, --small**

**-1, --fast**

**-2**

**-3**

**-4**

**-5**

**-6**

**-7**

**-8**

**-9, --best**

**--repetitive-fast**

**--repetitive-best**

**--exponential**

**bunzip2**

Compress, decompress, or test `.bz2` data.

**21 flags**

**-z, --compress**

**-d, --decompress**

**-t, --test**

**-k, --keep**

**-f, --force**

**-c, --stdout**

**-q, --quiet**

**-v, --verbose**

**-s, --small**

**-1, --fast**

**-2**

**-3**

**-4**

**-5**

**-6**

**-7**

**-8**

**-9, --best**

**--repetitive-fast**

**--repetitive-best**

**--exponential**

**zgrep**

Search compressed content.

**21 flags**

**-i, --ignore-case**

**-b, --byte-offset**

**-c, --count**

**-l, --files-with-matches**

**-L, --files-without-match**

**-n, --line-number**

**-v, --invert-match**

**-e, --regexp \<text>**

**-f, --file \<path>**

**-E, --extended-regexp**

**-G, --basic-regexp**

**-F, --fixed-strings, --fixed-regexp**

**-P, --perl-regexp**

**-H, --with-filename**

**-h, --no-filename**

**-m, --max-count \<text>**

**-o, --only-matching**

**-q, --quiet, --silent**

**-s, --no-messages**

**-w, --word-regexp**

**-x, --line-regexp**

`zegrep` and `zfgrep` invoke `zgrep` with `-E` and `-F` respectively. `uncompress` is `gzip -d`.

**Limits:** Archive creation does not traverse descendant mounts, and a mount root cannot be a source for `tar -c` or `zip`. Extracting or writing an archive requires a writable destination.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.