Page tree

 

JAVA

FORTRAN

C++

C

 

Link

h5ls

Lists specified features of HDF5 file contents

Syntax:

h5ls [OPTIONS]   file[/OBJECT]   [file[/OBJECT]...]

Description:
h5ls prints selected information about specified HDF5 file(s) and/or object(s) in the specified format. In some cases, information regarding symbolic links is also provided

Options and Parameters:
-h   or   -?   or   --help   Print a usage message and exit.
-a   or   --addressPrint addresses for raw data.

If a dataset is contiguous, the returned address is the offset in the file of the beginning of the raw data. If the dataset is chunked, the returned list of addresses indicates the offset of the beginning of each chunk.

If the option --follow-symlinks is used and a dataset is accessed via an external link, the address(es) will be the offset(s) in the target file.

This option works only in combination with the verbose option, -v or --verbose.

-d   or   --dataPrint the values of datasets.
--enable-error-stackPrints messages from the HDF5 error stack as they occur.

Injects error stack information, which is normally suppressed, directly into the output stream. This will disrupt normal h5ls output but is a useful diagnostic tool when data is not being correctly listed.

--follow-symlinksFollow symbolic links (soft links and external links) to display target object information.

Without this option, h5ls identifies a symbolic link as a soft link or external link and prints the value assigned to the symbolic link; it does not provide any information regarding the target object or determine whether the link is a dangling link.

--no-dangling-linksCheck for any symbolic links (soft links or external links) that do not resolve to an existing object (dataset, group, or named datatype). If any dangling link is found, this situation is treated as an error and h5ls returns an exit code of 1.

Must be used with the --follow-symlinks option; otherwise, h5ls will issue an error message and return an exit code of 1.

-f   or   --fullPrint full path names instead of base names.
-g   or   --groupShow information about a group, not its contents.
-l   or   --labelLabel members of compound datasets.
-r   or   --recursiveList all groups recursively, avoiding cycles.
-s   or   --stringPrint 1-bytes integer datasets as ASCII.
-S   or   --simpleUse a machine-readable output format.
-wN   or   --width=NSet the number of columns of output.
-v   or   --verboseGenerate more verbose output.
-V   or   --versionPrint version number and exit.
--vfd=DRIVERUse the specified virtual file drver. Valid values for DRIVER include:
    sec2
    family
    multi
    split
    mpio
    mpiposix 
-x   or   --hexdumpShow raw data in hexadecimal format.
fileThe file to be examined.

The file name may include a printf(3C) integer format such as %05d to open a file family.

On Unix, Linux, and Mac OS X systems, multiple files can be specified through the use of Unix-style wildcards. For example, assume that we are working with the files FileA.h5, FileB.h5, FileC.h5, and FileAB.h5:

  • File[AB].h5 will pick up any file that begins with File, followed by any one of the characters contained in the square brackets, and ending with .h5.

    In this case, File[AB].h5 will pick up the files FileA.h5 and FileB.h5.

  • File?.h5 will pick up all files whose names are File, followed by exactly 1 character (any character), followed by .h5.

    In this case, File?.h5 will pick up the files FileA.h5 and FileB.h5, and FileC.h5.

  • File*.h5 will pick up all files whose names begin with File and end with .h5.

    In this case, File*.h5 will pick up all four files.

The wildcard capability is not currently available on Windows systems.

objectsEach 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.
Deprecated options:
The following options have been deprecated in HDF5. While they remain available, they have been superseded as indicated and may be removed from HDF5 in the future. Use the indicated replacement option in all new work; where possible, existing scripts, et cetera, should also be updated to use the replacement option.
-e   or   --errorsShow all HDF5 error reporting.
Replaced by --enable-error-stack. This is an option name change only.
-E   or   --externalFollow external links.
Replaced by --follow-symlinks.

Exit Status:
0Succeeded.
> 0    An error occurred.

Example:
  1. Display root group in file quux.h5:
        h5ls quux.h5 
  2. Display datasets in file quux.h5:
        h5ls -d quux.h5/dset1 
  3. Display target objects of symbolic links (soft and external links) in file quux.h5:
        h5ls --follow-symlinks quux.h5 
  4. Display all group information in group g1 recursively, avoiding cycles, in file quux.h5:
        h5ls -r -g quux.h5/g1 

History:
Release    Change
1.8.5Options added in this release:
     --follow-symlinks
     --no-dangling-links
1.8.7Option name --enable-error-stack replaces deprecated option name --error in this release.

--- Last Modified: November 17, 2017 | 08:48 AM