Help us improve by taking our short survey: https://www.hdfgroup.org/website-survey/

| HDF5 Last Updated on 2026-03-23 The HDF5 Field Guide

Loading...
Searching...
No Matches
The HDF5 h5jam/h5unjam Tool

Navigate back: Main / HDF5 User Guide / Command Line Tools for HDF5 Files

# h5jam

## Introduction

- h5jam Adds user block to the front of an HDF5 file and creates a new concatenated file.
- h5unjam Splits an HDF5 file into two files, one containing the user block data and the other the HDF5 data.

## Usage

#### h5jam -i <in_file.h5> -u <in_user_file> [-o <out_file.h5>] [–clobber]

#### h5unjam -i <in_file.h5> [-o <out_file.h5> ] [-u <out_user_file> | –delete]

## h5jam Options

- -i in_file.h5 Specifies the input HDF5 file.
- -u in_user_file Specifies the file to be inserted into the user block. Can be any file format except an HDF5 format.
- -o out_file.h5 Specifies the output HDF5 file. If not specified, the user block will be concatenated in place to the input HDF5 file.
- –clobber Wipes out any existing user block before concatenating the given user block. The size of the new user block will be the larger of:
  - the size of existing user block in the input HDF5 file
  - the size of user block required by new input user file (size = 512 x 2N, N is positive integer.)
- -h Prints a usage message and exits.
- -V Prints the HDF5 library version and exits.

# h5unjam

## h5unjam Options

- -i in_file.h5 Specifies the HDF5 as input. If the input HDF5 file contains no user block, exit with an error message.
- -o out_file.h5 Specifies output HDF5 file without a user block. If not specified, the user block will be removed from the input HDF5 file.
- -u out_user_file Specifies the output file containing the data from the user block. Cannot be used with –delete option.
- –delete Remove the user block from the input HDF5 file. The content of the user block is discarded. Cannot be used with the -u option.
- -h Prints a usage message and exits.
- -V Prints the HDF5 library version and exits.

If neither –delete nor -u is specified, the user block from the input file will be displayed to stdout stream.

Previous Chapter h5import - Next Chapter h5ls

Navigate back: Main / HDF5 User Guide / Command Line Tools for HDF5 Files