h5dump
[
OPTIONS]
file
h5dump
enables the user to examine
the contents of an HDF5 file and dump those contents, in human
readable form, to an ASCII file.
h5dump
dumps HDF5 file content to standard output.
It can display the contents of the entire HDF5 file or
selected objects, which can be groups, datasets, a subset of a
dataset, links, attributes, or datatypes.
The --header
option displays object header
information only.
Names are the absolute names of the objects. h5dump
displays objects in the order same as the command order. If a
name does not start with a slash, h5dump
begins
searching for the specified object starting at the root group.
If an object is hard linked with multiple names,
h5dump
displays the content of the object in the
first occurrence. Only the link information is displayed in later
occurrences.
h5dump
assigns a name for any unnamed datatype in
the form of
#
oid1:
oid2, where
oid1 and oid2 are the object identifiers
assigned by the library. The unnamed types are displayed within
the root group.
Datatypes are displayed with standard type names. For example,
if a dataset is created with H5T_NATIVE_INT
type
and the standard type name for integer on that machine is
H5T_STD_I32BE
, h5dump
displays
H5T_STD_I32BE
as the type of the dataset.
h5dump
can also dump a subset of a dataset.
This feature operates in much the same way as hyperslabs in HDF5;
the parameters specified on the command line are passed to the
function
H5Sselect_hyperslab
and the resulting selection
is displayed.
The h5dump
output is described in detail in the
DDL for HDF5, the
Data Description Language document.
Note: It is not permissible to specify multiple
attributes, datasets, datatypes, groups, or soft links with one
flag. For example, one may not issue the command
WRONG:
h5dump -a /attr1 /attr2 foo.h5
to display both /attr1
and /attr2
.
One must issue the following command:
CORRECT:
h5dump -a /attr1 -a /attr2 foo.h5
It's possible to select the file driver with which to open the HDF5 file by using the --filedriver (-f) command-line option. Acceptable values for the --filedriver option are: "sec2", "family", "split", and "multi". If the file driver flag isn't specified, then the file will be opened with each driver in turn and in the order specified above until one driver succeeds in opening the file.
One byte integer type data is displayed in decimal by default. When displayed in ASCII, a non-printable code is displayed in 3 octal digits preceeded by a back-slash unless there is a C language escape sequence for it. For example, CR and LF are printed as \r and \n. Though the NUL code is represented as \0 in C, it is printed as \000 to avoid ambiguity as illustrated in the following 1 byte char data (since this is not a string, embedded NUL is possible).
141 142 143 000 060 061 062 012 a b c \0 0 1 2 \nh5dump prints them as "abc\000012\n". But if h5dump prints NUL as \0, the output is "abc\0012\n" which is ambiguous.
--xml
option, h5dump
generates
XML output. This output contains a complete description of the file,
marked up in XML. The XML conforms to the HDF5 Document Type
Definition (DTD) available at
http://www.hdfgroup.org/DTDs/HDF5-File.dtd
.
The XML output is suitable for use with other tools, including the HDF5 Java Tools.
-h or --help |
Print a usage message and exit. |
-n or --contents |
Print a list of the file contents and exit. |
-B or --bootblock |
Print the content of the boot block. |
-H or --header |
Print the header only; no data is displayed. |
-A or --onlyattr |
Print the header and value of attributes; data of datasets is not displayed. |
-i or --object-ids |
Print the object ids. |
-r or --string |
Print 1-byte integer datasets as ASCII. |
-e or --escape |
Escape non-printing characters. |
-V or --version |
Print version number and exit. |
-a P or --attribute=P |
Print the specified attribute. |
-d P or
--dataset=P |
Print the specified dataset. |
-y or --noindex |
Do not print array indices with data. |
-p or --properties |
Print information regarding dataset properties,
including filters, storage layout, fill value,
and allocation time.
The filter output lists any filters used with a dataset, including the type of filter, its name, and any filter parameters. The storage layout output specifies the dataset layout (chunked, compact, or contiguous), the size in bytes of the dataset on disk, and, if a compression filter is associated with the dataset, the compression ratio. The compression ratio is computed as (uncompressed size)/(compressed size). The fill value output includes the fill value datatype and value. The allocation time output displays the allocation time as specified with H5Pset_alloc_time .
|
-f D or --filedriver=D |
Specify which driver to open the file with. |
-g P or
--group=P |
Print the specified group and all members. |
-l P or --soft-link=P |
Print the value(s) of the specified soft link. |
-o F or
--output=F |
Output raw data into file F. |
-b B or
--binary=B |
Output dataset to a binary file
using the datatype specified by B .
B must have one of the following values:
LE
Little-endian
BE
Big-endian
MEMORY
Memory datatype
FILE
File datatype
Recommended usage is with the -d and -o
options.
|
-t P or
--datatype=P |
Print the specified named datatype. |
-w N or
--width=N |
Set the number of columns of output. A value of 0 (zero) sets the number of columns to the maximum (65535). Default width is 80 columns. |
-m T or
--format=T |
Set the floating point output format.
T is a string defining the floating point format, e.g., '%.3f' .
|
-q Q or
--sort_by=Q |
Sort groups and attributes by the specified
index type, Q.
Valid values of Q are as follows:
name
Alpha-numeric index by name (Default)
creation_order
Index by creation order
|
-z Z or
--sort_order=Z |
Sort groups and attributes in the specified
order, Z.
Valid values of Z are as follows:
ascending
Sort in ascending order (Default)
descending
Sort in descending order
|
-R or
--region |
Print dataset pointed by region references. |
-x or
--xml |
Output XML using XML schema (default) instead of DDL. |
-u or
--use-dtd |
Output XML using XML DTD instead of DDL. |
-D U or
--xml-dtd=U |
In XML output, refer to the DTD or schema at U instead of the default schema/DTD. |
-X S or
--xml-dns=S |
In XML output, (XML Schema) use qualified names in
the XML: ":": no namespace, default: "hdf5:" |
-s START or
--start=START |
Offset of start of subsetting selection. Default: the beginning of the dataset. |
-S STRIDE or
--stride=STRIDE |
Hyperslab stride. Default: 1 in all dimensions. |
-c COUNT or
--count=COUNT |
Number of blocks to include in the selection. Default: 1 in all dimensions. |
-k BLOCK or
--block=BLOCK |
Size of block in hyperslab. Default: 1 in all dimensions. |
-- |
Indicates that the following argument is not an option.
E.g., to dump a file called `-f', use h5dump -- -f.
(This option is necessary only when the name of the file to be examined
starts with a dash (- ), which could confuse the tool’s
command-line parser.) |
file | The file to be examined. |
D | which file driver to use in opening the file. Acceptable values are "sec2", "family", "split", and "multi". Without the file driver flag, the file will be opened with each driver in turn and in the order specified above until one driver succeeds in opening the file. |
P | The full path from the root group to the object |
F | A filename |
N | An integer greater than 1 |
START, STRIDE, COUNT, BLOCK | A list of integers, the number of which is equal to the number of dimensions in the dataspace being queried |
U | A URI (as defined in [IETF RFC 2396], updated by [IETF RFC 2732]) that refers to the DTD to be used to validate the XML |
B | The form of binary output:MEMORY for a memory typeFILE for the file typeLE or BE
for pre-existing little- or big-endian types
|
Subsetting parameters can also be expressed in a convenient
compact form, as follows:
--dataset="/foo/mydataset[START;STRIDE;COUNT;BLOCK]"
Until the last parameter value used, all of the semicolons (;
) are required, even when
a parameter value is not specified. Example:
--dataset="/foo/mydataset[START;;COUNT]"
--dataset="/foo/mydataset[START]"
When not specified, default parameter values are used.
0 | Succeeded. |
>0 | An error occurred. |
|
h5dump
displays the
following information:
|
Release | Command Line Tool |
1.6.5 |
The following options added in this release:
-n or --contents
-e or --escape
-y or --noindex
-p or --properties
-b or --binary
|
1.8.0 |
The following options added in this release:
-q or --sort_by
-z or --sort_order
|
1.8.1 | Compression ratio added to -p option in this release. |
1.8.4 | Region reference display added with -R option in this release. |