noqtis-chunk(1)
NAME
noqtis-chunk —
record the chunk digests of a large file, and check a piece
of it
SYNOPSIS
noqtis chunk pin |
[--size bytes]
dir file ... |
noqtis chunk check |
[--at offset]
[-j | --json]
dir file [piece] |
DESCRIPTION
pin reads each file
in dir once and records in the data record
(chunks,
noqtis-data(5)) the
SHA-256 of each run of --size bytes (default
1048576; 1024 to 1073741824), the last run short. The file is not split.
Seal the folder afterwards: the seal covers the digests through the
record.
check checks file,
or piece, a part of it whose first byte is byte
--at of the file (a multiple of the chunk size;
default 0), against the recorded digests: each whole chunk it holds, and a
short last one when it ends where the file does. Only that is read, so a
range fetched alone, or the part of a file that survived, can be checked
without the rest. A short run at the end of a piece that is not the file's
end is not checked, and a row says so.
To trust the digests without the file, check the record's seal
alone: ‘noqtis check --only
noqtis.data.json’.
noqtis-data(1)
check checks each file whole against its chunks.
EXIT STATUS
- 0
- Recorded; or every chunk read matches.
- 1
- A chunk differs, the piece runs past the file, or it holds no whole chunk.
- 2
- A usage or file error, or no chunks recorded for file.
EXAMPLES
$ noqtis chunk pin --size 4194304 results data/big.parquet $ noqtis seal -k me results $ curl -r 8388608-16777215 -o part https://example.org/big.parquet $ noqtis check -p me.pub --only noqtis.data.json results $ noqtis chunk check --at 8388608 results data/big.parquet part
SEE ALSO
noqtis-check(1), noqtis-data(1), nqdchunk(3), noqtis-data(5)