[Top] [Prev] [Next]

15.2 Listing Basic Information About an HDF File: hdfls

15.2.1 General Description

The hdfls utility provides general information about the tags, reference numbers, and if requested, lengths of the data elements.

15.2.2 Command-Line Syntax

hdfls [-o][-l][-d][-v][-g][-s][-h][-t #] filename

-o Ordered

Indicates the reference numbers are to be displayed in ascending order.

-l Long format

Displays more information about the file.

-d Offset/length

Offset and length information will be displayed for each element in the file.

-v Verbose

Annotation and label text will be displayed, along with the format triggered by the -l flag. (long format)

-g Group

List items by group.

-s Special elements

Display detailed information about special elements.

-h DD block

Dump DD block information.

-t Tag

Only list information about the specified tag. Must be followed by a tag number.

15.2.3 Examples

A file called "aa.hdf" contains three items associated with a raster image; the image dimensions, a palette, and the raster image. To display information about the contents of this file, the following command is used.

hdfls aa.hdf
The following output is displayed:

	aa.hdf:
Image Dimensions-8: 			(Raster-8): (tag 200)
	Ref nos: 1
Image Palette-8:			(Raster-8): (tag 201)
	Ref nos: 3
Raster Image-8:			(Raster-8): (tag 202)
	Ref nos: 1
The following displays the same information with the length of each data element:

hdfls -l aa.hdf
This would result in the following information being displayed:

	aa.hdf:
	Image Dimensions-8: 		(Raster-8)	: (tag 200)
	Ref no 1		4 bytes
	Image Palette-8:		(Raster-8)	: (tag 201)
	Ref no 3 		768 bytes
	Raster Image-8:		(Raster-8)	: (tag 202)
	Ref no 1		120000 bytes


[Top] [Prev] [Next]

hdfhelp@ncsa.uiuc.edu
HDF User's Guide - 07/21/98, NCSA HDF Development Group.