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:
- right click target variable name
- select New → Link → Soft Link
- 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.
Other HDF5 link types
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.