DMATTR(1)

NAME

dmattr - Acquires DMF attributes of a file

SYNOPSIS

dmattr [-a dmf_attribute_list] [-d delimiter] [-h] [-l] names

IMPLEMENTATION

SGI IRIX systems licensed for the Data Migration Facility (DMF).

DESCRIPTION

The dmattr command returns a specified set of DMF attributes for the requested files. This command can be used within shell scripts to examine the value of certain DMF attributes on a file. The attributes dmattr obtains for a file are specified with the -a option as a list of attributes separated by spaces. If you do not specify the -a option, dmattr lists the values of all the attributes in order in which they are presented on this man page (alphabetical by attribute name). It is generally best to specify an order. The attributes listed are separated by spaces unless the -d option is used to change the default delimiter that is to be used.

dmattr accepts the following options:

     Option         Description
-a dmf_attribute_list
Obtains one or more of the following attributes of a file, in the order specified:

bfid
Returns the bit file identifier (bfid) of the specified file.

emask
Returns the DMF Data Management API (DMAPI) event mask of the specified file.

fhandle
Returns the fhandle for the specified file. The fhandle is the DMF representation of the DMAPI name for the file in the file system.

flags
Returns the DMF DMAPI flags mask for the specified file.

nregn
Returns the number of DMF DMAPI managed regions for the specified file.

owner
Returns the user ID of the owner of the specified file.

path
Includes the path name of the requested file in the list of attributes.

size
Returns the file size in bytes.

space
Returns the space (in bytes) currently occupied by the file. This number may be larger or smaller than the length of the file.

state
Returns a three-character identifier indicating the DMF state of the specified file. The identifier can be one of the following:

REG File not managed by DMF
MIG Migrating file
DUL Dual-state file
OFL Offline file
UNM Unmigrating file
NMG Nonmigratable file
INV DMF cannot determine the file's state

-d delimiter
One-character value that will be used as the delimiter in the output list. The default delimiter is a space.

-h
Treat names provided to the command as DMAPI fhandles rather than file paths. When you use this option, the path field will always be reported as UNKNOWN.

-l
Print the file attributes, one per line, with a label.

names
Specifies a list of file paths or fhandles to process. If you do not specify names, dmattr processes names read from standard input.

EXIT STATUS

An exit status of 0 (zero) indicates that dmattr was able to acquire
all of the requested attributes successfully. An exit status of 1
indicates that an error occurred.

EXAMPLES

The following example lists the state, bfid, and path attributes for
the files matching the pattern /dmf/dmf_tst.004*:

#dmattr -a state,bfid,path /dmi4/dmf_tst.004*
OFL 33d510e80000000000000146 /dmi4/dmf_tst.00411
OFL 33d510e80000000000000149 /dmi4/dmf_tst.00421
OFL 33d510e800000000000000f2 /dmi4/dmf_tst.00431
OFL 33d510e80000000000000122 /dmi4/dmf_tst.00491

SEE ALSO

dmfind(1), dmls(1)