CBF-REWRITE(1) General Commands Manual CBF-REWRITE(1)

cbf-rewrite
rewrite CBF images

cbf-rewrite [-hpv] [-H name=value] [file ...]

The cbf-rewrite program rewrites CBF images.

By default, cbf-rewrite reads a CBF image from the standard input stream, rewrites it according to the options given, and writes the output to the standard output stream.

The file arguments are processed in the order given. A single dash (‘-’) represents the standard input stream, and may appear multiple times in the file list. When the standard input stream is read, the rewritten CBF image is written to the standard output stream. When a file is read, it is rewritten to a temporary file of the same name as the file being processed but ending in .tmp, and then moved into place, replacing the original file. If no file arguments are given, the standard input stream is read.

The options are as follows:

Print a help message and exit.
Preserve the user ID, group ID, file mode, access time, and modification time of the original file, as allowed by permissions.

If the user ID or group ID cannot be preserved due to insufficient permissions, no error message is printed and the exit status is not changed.

If the set-user-ID-on-execution bit or the set-group-ID-on-execution bit is set on the source, and the user ID or the group ID cannot be set on the destination, then neither the set-user-ID-on-execution bit nor the set-group-ID-on-execution bit are set on the destination.

Extended attributes are not preserved.

Produce more verbose output.
name=value
Set the value of the name header field to value. This option may be given multiple times to set multiple header fields at once. Note that value is the right-hand side text of the header field name-value pair, so, for example, in the case of a numeric-valued header field with a unit, value should be the text containing the numeric value, whitespace, and the unit, not just the numeric value.

The following special header field names can be used to identify header fields that do not have a name:

The image acquisition timestamp.

The cbf-rewrite program exits 0 on success, and >0 if an error occurs.

To change the exposure period to 0.5 seconds, preserving file attributes:

$ cbf-rewrite -p -H Exposure_period='0.5 s' foo.cbf

To change the timestamp:

$ cbf-rewrite -H Pseudo.Timestamp=2021-01-13T14:58:12.602 foo.cbf
July 21, 2021