Last modified: 5 May 2016
Tool Name: h5clear
Syntax:
h5clear [OPTIONS] file

Purpose:
To clear the status_flags field in the superblock of the file specified in the command line or to remove the metadata cache image from the file.

Description:
The h5clear tool can either clear the status_flags field in the superblock of the file or close a metadata cache image in the specified file.

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 h5clear tool will clear the status_flags field, and the user can then open the file.

When used to close a metadata cache image, h5clear 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, h5clear will generate a warning message to that effect.


File Options:
-h, --help Print a usage message and exit
-V, --version Print version number and exit
-s, --status Clear the status_flags field in the file's superblock
-m, --image Remove the metadata cache image from the file
Exit Status:
0 Succeeded.
> 0     An error occurred.

History:
Release Change
1.10.1 -m, --image option added to remove the metadata cache image.
1.10.0 Tool introduced in this release.