Create HDF5 soft links with HDFView

HDF5 soft (symbolic) links work like in filesystems–convenient as HDF5 UI is like a filesystem in a file. An unlimited number of soft links can point to the same resource. Soft links can dangle (point to an missing location) if needed.


The HDFView GUI can create softlinks as well. This is handy when the program code changes variable name and one wants to keep HDF5 files compatible with old and new code (old name and new name). To create an HDF5 soft link in HDFView:

  1. right click target variable name
  2. select New → Link → Soft Link
  3. when done, use the “close” button to save these changes

Note: if HDFView User Options are set to “Read Only” the “New” right-click option will be grayed out.

The soft link appears as any other variable in the HDFView GUI.

HDFView and other HDF5 interfaces can also create hard links and external links. An unlimited number of hard links can point to the same resource like soft links, but hard links are not allowed to dangle.

External links create a soft link to a resource in another HDF5 file. External links can be useful where datasets are very large, but one can treat a collection of files as one gigantic file from the user perspective.