[ HDF5 Tutorial Top ]

Utilities (h5dump, h5ls)

The h5dump and h5ls utilities can be used to examine the contents of an hdf5 file.


h5dump [OPTIONS] file
      -h, --help          Print a usage message and exit
      -B, --userblock     Print the content of the user block
      -H, --header        Print the header only; no data is displayed
      -i, --object-ids    Print the object ids
      -V, --version       Print version number and exit
      -a P, --attribute=P Print the specified attribute
      -d P, --dataset=P   Print the specified dataset
      -g P, --group=P     Print the specified group and all members
      -l P, --soft-link=P Print the value(s) of the specified soft link
      -o F, --output=F    Output raw data into file F
      -t P, --datatype=P  Print the specified named data type
      -w N, --width=N     Set the number of columns of output
      -x, --xml           Output in XML
      -D U, --xml-dtd=U   Use the DTD at U

 Subsetting is available by using the following options with a dataset
 attribute. Subsetting is done by selecting a hyperslab from the data.
 Thus, the options mirror those for performing a hyperslab selection.
 The START and COUNT parameters are mandatory if you do subsetting.
 The STRIDE and BLOCK parameters are optional and will default to 1 in
 each dimension.

      -s L, --start=L     Offset of start of subsetting selection
      -S L, --stride=L    Hyperslab stride
      -c L, --count=L     Number of blocks to include in selection
      -k L, --block=L     Size of block in hyperslab

  P - is the full path from the root group to the object.
  F - is a filename.
  N - is an integer greater than 1.
  L - is a list of integers the number of which are equal to the
        number of dimensions in the dataspace being queried
  U - is a URI reference (as defined in [IETF RFC 2396],
        updated by [IETF RFC 2732])


  1) Attribute foo of the group /bar_none in file quux.h5

        h5dump -a /bar_none/foo quux.h5

  2) Selecting a subset from dataset /foo in file quux.h5

      h5dump -d /foo -s "0,1" -S "1,1" -c "2,3" -k "2,2" quux.h5


      -h, -?, --help   Print a usage message and exit
      -a, --address    Print addresses for raw data
      -d, --data       Print the values of datasets
      -e, --errors     Show all HDF5 error reporting
      -f, --full       Print full path names instead of base names
      -g, --group      Show information about a group, not its contents
      -l, --label      Label members of compound datasets
      -r, --recursive  List all groups recursively, avoiding cycles
      -s, --string     Print 1-byte integer datasets as ASCII
      -S, --simple     Use a machine-readable output format
      -wN, --width=N   Set the number of columns of output
      -v, --verbose    Generate more verbose output
      -V, --version    Print version number and exit
      -x, --hexdump    Show raw data in hexadecimal format

      Each object consists of an HDF5 file name optionally followed by a
      slash and an object name within the file (if no object is specified
      within the file then the contents of the root group are displayed).
      The file name may include a printf(3C) integer format such as
      "%05d" to open a file family.

The HDF Group
Last Modified: February 20, 2007