Query JSON, calculate, encode, checksum and work with archives.
Commands for structured data, encodings, checksums and archives, beside the
Core Tools. Expand a command to see every flag it takes;
man COMMAND prints its manual.
JSON and calculations
Query and transform a stream of JSON values.
Show 28 flags
Use null as the single input value.
Read each line as a string instead of JSON.
Read all inputs into one array.
Compact instead of pretty-printed output.
Output strings without quotes or escapes.
Implies -r and writes NUL after each output.
Implies -r and writes no trailing newline.
Escape non-ASCII characters in output.
Sort object keys on output.
Set the exit status from the last output.
Indent with tabs.
Indent with n spaces (max 7).
Read as —stream does, a parse error as one more event.
Add a directory to the module search list.
Accepted; output stays plain.
Disable colored output (already the default).
Accepted for compatibility; output is one buffer.
Read the filter from a file.
Read each input as its [path, leaf] events.
Read and write RS-delimited JSON text sequences.
Set $name to a string value.
Set $name to a JSON value.
Set $name to a file’s contents.
Set $name to a file’s documents, as an array.
Read the remaining operands as positional string values.
Read the remaining operands as positional JSON values.
Show this help and exit.
Show version information and exit.
Evaluate numeric expressions.
Show 2 flags
Load the standard math library.
Suppress the welcome banner.
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
Encode or decode Base64.
Show 4 flags
Convert character encodings.
Show 6 flags
Create or reverse a hex dump.
Show 16 flags
Dump bytes in a chosen format.
Show 33 flags
Print an MD5 digest.
Generate or verify checksums.
Show 10 flags
Generate or verify checksums.
Show 11 flags
Archives and compression
Create, extract, or list archives.
Show 38 flags
Create ZIP archives.
Show 29 flags
Extract, inspect, or test ZIP archives.
Show 24 flags
Compress or decompress gzip data.
Show 23 flags
Decompress or test gzip data.
Show 23 flags
Read compressed content to stdout.
Show 23 flags
Compare compressed files.
Show 6 flags
Compare compressed files.
Show 38 flags
Compress, decompress, or test .xz data.
Show 23 flags
Compress, decompress, or test .xz data.
Show 23 flags
Compress, decompress, or test .bz2 data.
Show 21 flags
Compress, decompress, or test .bz2 data.
Show 21 flags
Search compressed content.
Show 21 flags
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.