---
name: "hdiff"
section: "1"
platform: "linux"
package: "hdf4-tools"
version: "4.3.0-1+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/hdiff"
---

# hdiff(1)

compares two HDF files and reports the differences

## NAME

hdiff - compares two HDF files and reports the differences

## SYNOPSIS

**hdiff**  \[**-V**\] \[**-b**\] \[**-g**\] \[**-s**\] \[**-d**\] \[**-D**\] \[**-S**\] \[**-v** *var1\[,...\]*\] \[**-u** *var1\[,...\]*\] \[**-e** *count*\] \[**-t** *limit*\] \[**-p** *relative*\] file1 file2

## DESCRIPTION

**hdiff** compares two HDF files and reports the differences.

## OPTIONS

- FC**-V**F\[0\]

  Display version of the HDF4 library and exit

- FC**-b**F\[0\]

  Verbose mode

- FC**-g**F\[0\]

  Compare global attributes only

- FC**-s**F\[0\]

  Compare SD local attributes only

- FC**-d**F\[0\]

  Compare SD data only

- FC**-D**F\[0\]

  Compare Vdata data only

- FC**-S**F\[0\]

  Print statistics

- FC**-v**F\[0\] *var1\[,...\]*

  Compare SD data on variable(s) *var1*,... only

- FC**-u**F\[0\] *var1\[,...\]*

  Compare vdata on variable(s) *var1*,... only

- FC**-e**F\[0\] *count*

  Print difference up to count number for each variable

- FC**-t**F\[0\] *limit*

  Print difference when it is greater than limit

- FC**-p**F\[0\] *relative*

  Print difference when it is greater than a relative limit

- FC*file1*F\[0\]

  File name of the first HDF file

- FC*file2*F\[0\]

  File name of the second HDF file

The '*count*' value must be a positive integer

The '*limit*' and '*relative*' values must be positive numbers

The FC**-t**F\[0\] compare criteria is \|a - b\| \> limit

The FC**-p**F\[0\] compare criteria is \|(b-a)/a\| \> relative

Return codes: 0 (no differences found), 1 (differences found)
