h5dump(1)
π h5dump(1) π
okay bestie, gather round, because this is the manual page for h5dump from the General Commands Manual, and she is that girl. π
β¨ NAME β¨
h5dump β shows you what's inside an HDF5 file. that's it. that's the vibe.
β¨ SYNOPSIS β¨
h5dump [OPTIONS] file
β¨ DESCRIPTION β¨
so h5dump lets you peek inside an HDF5 file and dump all that content out in human-readable form into an ASCII file. no cap, it's literally the "open the box and look inside" tool. π¦
h5dump dumps HDF5 file content to standard output. you can display the whole entire file, or you can be picky and select specific objects β groups, datasets, a subset of a dataset, links, attributes, or datatypes. choose your own adventure. π
the --header option displays object header information only. that's it, no data, just the header lore.
Names are the absolute names of the objects. h5dump displays objects in the same order as the command order. If a name doesn't start with a slash, h5dump starts searching for the specified object at the root group. so like, it'll find it, don't stress. π
If an object is hard linked with multiple names, h5dump displays the content of the object at the first occurrence. later occurrences? they only get the link information. main character gets the full story, everyone else gets a cameo. β¨
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. these 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, then h5dump displays H5T_STD_I32BE as the type of the dataset. it's giving translator. π
h5dump can also dump a subset of a dataset. this feature operates in much the same way as hyperslabs in HDF5; the parameters you specify 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 permissable to specify multiple attributes, datasets, datatypes, groups, or soft links with one flag. like, one flag = one object, okay? for example, you may not issue the command
WRONG: h5dump -a /attr1 /attr2 foo.h5
to display both /attr1 and /attr2. you must issue the following command instead:
CORRECT: h5dump -a /attr1 -a /attr2 foo.h5
see? one flag each. we don't cut corners here. π
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", "multi", and "stream". 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. it just keeps trying until something works. persistence, honestly iconic. π₯
π XML OUTPUT π
with the --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://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd.
the XML output is suitable for use with other tools, including the HDF5 Java Tools. interoperability? slay. π«
π OPTIONS π
okay here's the whole menu, no skips, no skimming:
-hor--helpβ print a usage message and exit. your lil helper. π«Ά-Bor--bootblockβ print the content of the boot block. (this option is not yet implemented.) π-Hor--headerβ print the header only; no data is displayed.-Aβ print the header and value of attributes; data of datasets is not displayed.-ior--object-idsβ print the object ids.-ror--stringβ print 1-bytes integer datasets as ASCII.-Vor--versionβ print version number and exit.-a Por--attribute=Pβ print the specified attribute.-d Por--dataset=Pβ print the specified dataset.-f Dor--filedriver=Dβ specify which driver to open the file with.-g Por--group=Pβ print the specified group and all members.-l Por--soft-link=Pβ print the value(s) of the specified soft link.-o For--output=Fβ output raw data into fileF.-t Tor--datatype=Tβ print the specified named datatype.-w Nor--width=Nβ set the number of columns of output.-xor--xmlβ output XML using XML schema (default) instead of DDL.-uor--use-dtdβ output XML using XML DTD instead of DDL.-D Uor--xml-dtd=Uβ in XML output, refer to the DTD or schema atUinstead of the default schema/DTD.-X Sor--xml-dns=Sβ in XML output, (XML Schema) use qualified names in the XML:":": no namespace, default:"hdf5:"-s Lor--start=Lβ offset of start of subsetting selection. Default: the beginning of the dataset.-S Lor--stride=Lβ hyperslab stride. Default:1in all dimensions.-c Lor--count=Lβ number of blocks to include in the selection.-k Lor--block=Lβ size of block in hyperslab. Default:1in all dimensions.--β indicate that all following arguments are non-options. E.g., to dump a file called-f, useh5dump -- -f.fileβ the file to be examined.
π¦ option parameters, decoded π¦
the option parameters listed above are defined as follows:
Dβ which file driver to use in opening the file. Acceptable values are"sec2","family","split","multi", and"stream". 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.Tβ the name of the datatype.Fβ a filename.Nβ an integer greater than1.Lβ 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.
β subsetting, the compact way β
Subsetting parameters can also be expressed in a convenient compact form, as follows:
--dataset="/foo/mydataset[START;STRIDE;COUNT;BLOCK]"
All of the semicolons (;) are required, even when a parameter value is not specified. When not specified, default parameter values are used. no skipping your semicolons bestie, they're load-bearing. π§
π EXAPLES π
- Dumping the group
/GroupFoo/GroupBarin the filequux.h5:
h5dump -g /GroupFoo/GroupBar quux.h5
- Dumping the dataset
Fnordin the group/GroupFoo/GroupBarin the filequux.h5:
h5dump -d /GroupFoo/GroupBar/Fnord quux.h5
- Dumping the attribute
metadataof the datasetFnordwhich is in group/GroupFoo/GroupBarin the filequux.h5:
h5dump -a /GroupFoo/GroupBar/Fnord/metadata quux.h5
- Dumping the attribute
metadatawhich is an attribute of the root group in the filequux.h5:
h5dump -a /metadata quux.h5
- Producing an XML listing of the file
bobo.h5:
h5dump --xml bobo.h5 > bobo.h5.xml
- Dumping a subset of the dataset
/GroupFoo/databar/in the filequux.h5
h5dump -d /GroupFoo/databar --start="1,1" --stride="2,3" --count="3,19" --block="1,1" quux.h5
- The same example using the short form to specify the subsetting parameters:
h5dump -d "/GroupFoo/databar[1,1;2,3;3,19;1,1]" quux.h5
π CURRENT STATUS π
The current version of h5dump displays the following information:
- Group
- group attribute (see Attribute)
- group member
- Dataset
- dataset attribute (see Attribute)
- dataset type (see Datatype)
- dataset space (see Dataspace)
- dataset data
- Attribute
- attribute type (see Datatype)
- attribute space (see Dataspace)
- attribute data
- Datatype
- integer type
H5T_STD_I8BE,H5T_STD_I8LE,H5T_STD_I16BE, ...
- floating point type
H5T_IEEE_F32BE,H5T_IEEE_F32LE,H5T_IEEE_F64BE, ...
- string type
- compound type
- named, unnamed and transient compound type - integer, floating or string type member
- opaque types
- reference type
- object references
- data regions
- enum type
- variable-length datatypes
- atomic types only
- scalar or single dimensional array of variable-length types supported
- integer type
- Dataspace
- scalar and simple space
- Soft link
- Hard link
- Loop detection
πΈ SEE ALSO πΈ
h5ls(1), h5diff(1), h5repart(1), h5import(1), gif2h5(1), h52gif(1), h5perf(1)
- HDF5 Data Description Language syntax at
file:///usr/share/doc/libhdf5-doc/html/ddl.html - HDF5 XML Schema at
http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.xsd - HDF5 XML information at
http://hdf.ncsa.uiuc.edu/HDF5/XML/
and that's the whole page, bestie!! π₯³ this was h5dump(1) from the General Commands Manual β the footer of the original just says h5dump(1) again, so like, consider this your lil sign-off. go dump some files, you're gonna do amazing. πβ¨π¦πΈππ«Ά
π¦ where this page comes from
- debian bookworm: hdf5-tools 1.10.8+repack1-1 Β· BSD-3-Clause
- debian trixie: hdf5-tools 1.14.5+repack-3 Β· BSD-3-Clause
- epel 10: hdf5 1.14.5-1.el10_0 Β· BSD-3-Clause
- epel 9: hdf5 1.12.1-7.el9.1 Β· BSD
- fedora 43: hdf5 1.14.6-6.fc43 Β· BSD-3-Clause
- fedora 43: hdf5 1.14.6-6.fc43 Β· BSD-3-Clause
- fedora 44: hdf5 1.14.6-7.fc44 Β· BSD-3-Clause
- fedora 44: hdf5 1.14.6-7.fc44 Β· BSD-3-Clause
- ubuntu jammy: hdf5-tools 1.10.7+repack-4ubuntu2 Β· BSD-3-Clause
- ubuntu noble: hdf5-tools 1.10.10+repack-3.1ubuntu4 Β· BSD-3-Clause
- ubuntu questing: hdf5-tools 1.14.5+repack-3build1
- ubuntu resolute: hdf5-tools 1.14.6+repack-2 Β· BSD-3-Clause
- ubuntu stonking: hdf5-tools 2.2.0+repack-5 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms