17.6 recfix
recfix checks and fixes rec files. Synopsis:
recfix [option]... [operation] [op_option]... [file]
If no file is specified then the command acts like a filter,
getting the data from the standard input and writing the result in the
standard output.
In addition to the common options described earlier (see Common Options) the program accepts the following global options.
- ‘--no-external’
- Don't use external record descriptors.
The effect of running recfix depends on the operation it
performs. The operation mode is selected by using one of the
following options.
- ‘--check’
- Check the integrity of the database contained in the file, printing
diagnostics messages in case something is not right. This is the
default operation.
- ‘--sort’
- Perform a physical sort of all the records contained in the file (or
the standard input) after checking for its integrity. The sorting
criteria are provided by the
%sort
special field, if any. If
there is an integrity failure the sorting is not performed.
Note that this is a destructive operation.
- ‘--encrypt’
- Encrypt all the non encrypted fields in the database which are marked
as confidential. This operation requires a password. If no password
is specified with -s and the program is run in a terminal, a
prompt is used to get the password from the user.
If this operation is performed to a file having encrypted fields, the
operation will fail unless --force is used.
Note that this is a destructive operation.
- ‘--decrypt’
- Decrypt all the encrypted fields in the database which are marked as
confidential. This operation requires a password. If no password is
specified with -s and the program is run in a terminal, a
prompt is used to get the password from the user.
Note that this is a destructive operation.
- ‘--auto’
- Insert auto-generated fields as appropriate in the records which are
missing them.
Note that this is a destructive operation.
Some operations make use of certain specific options, which are
described in the table below.
- ‘-s secret’
- ‘--password=secret’
- Password used to encrypt or decrypt fields.
- ‘--force’
- Force potentially dangerous operations.