Page tree

The license could not be verified: License Certificate has expired!









Clears superblock status_flags field, removes metadata cache image, prints EOA and EOF, or sets EOA of a file

h5clear [OPTIONS] file


h5clear is a command line tool that performs the following for the specified file:

--status option

Clear the status_flags  field in the specified file’s superblock.

With the implementation of file locking, the library uses the  status_flags  field in the superblock to mark a file as in writing or SWMR writing mode when a file is opened. The library will clear this field when the file closes. 

However, a situation may occur where an open file is closed without going through the normal library file closing procedure, and this field will not be cleared as a result. An example would be if an application program crashed. This situation will prevent a user from opening the file.

The tool will open the supplied HDF5 file in Read-Write (R/W) mode and clear the  status_flags  field in the superblock.  The user can then open the file.

--image option

Remove the metadata cache image in the specified file.

The tool will open the supplied HDF5 file in Read-Write (R/W) mode, check to see if it contains a cache image, and then close it. If the file does not contain a cache image, the tool will generate a warning message to that effect.


Print the file’s EOA and EOF.

The tool will open the supplied HDF5 file in Read-only mode and print the file’s stored EOA (end-of-file address) in the superblock and the EOF (actual end-of-file).  This option cannot be combined with the --status, --image and --increment options because the file is opened in Read-Write mode for these three options.

--increment=C option

Set the specified file’s EOA.

The tool will open the supplied HDF5 file in Read-Write (R/W) mode, and set the file’s EOA to the maximum of EOA and EOF plus C.  If C is not supplied, the tool will use 1M as the default increment.

This option helps to repair a crashed file where the stored EOA in the superblock is different from the actual EOF.  The file’s EOA and EOF will be the same after applying this option to the file.

Options and Parameters:
-h, --helpPrint a usage message and exit
-V, --versionPrint version number and exit
-s, --statusClear the  status_flags  field in the file's superblock
-m, --imageRemove the metadata cache image from the file
--filesizePrint the file’s EOA and EOF

Set the file’s EOA to the maximum of (EOA, EOF) + C for the file

C is >= 0; C is optional and will default to 1M when not set

Exit Status:
> 0    An error occurred

1.10.2Add two options: --increment and –filesize
1.10.1-m,  --image  option added to remove the metadata cache image
1.10.0Tool introduced in this release


--- Last Modified: March 14, 2018 | 03:56 PM