FTAM/9000 User's Guide

64 Chapter 4
Special FTAM Files
FTAM Shadow Files
Precautionary Notes about Shadow Files
An HP-UX file together with its FTAM shadow file forms a logical unit,
which should be maintained. This logical unit can be thought of as “an
FTAM file,” and is distinct from an ordinary HP-UX file. The two HP-UX
files are paired, based on their related names. However, the underlying
HP-UX system does not enforce this logical matching.
As a result, common HP-UX utilities like cp, mv, rm, or chmod can
inadvertently cause inconsistencies when applied to FTAM files.
For example, consider the previous case, which discussed two files: one
called mydata, and its shadow file, ._mydata. If you use mv to rename
mydata to junedata, the contents of the file are unchanged. However,
the complementary shadow file ._mydata is not automatically renamed
to become ._junedata. Consequently, the FTAM shadow file
information it contains is no longer linked to the matching data file.
Of course, FTAM can still be used with the junedata file, but it will
apply default attribute information as noted previously. If the shadow
file ._mydata contained other (non–default) information, such as access
control, that information is effectively lost. It is possible, in this example,
to use mv to also rename ._mydata to ._junedata. This restores the
logical pairing between the shadow file and the data file.
However, the best approach is to use ftam or fcattr-n to rename the file.
These FTAM utilities will automatically update any existing shadow
files. Likewise, you will want to use FTAM utilities like fcp and fmv to
copy or move FTAM files.
You should also use fdel or ftam to delete FTAM files. If you use rm
instead, the shadow file will continue to exist. Over time, you could
accumulate a clutter of unused shadow files. In the worst case, you could
create a new file with the same name as an outdated shadow file. The
information in the shadow file may not match the real attributes or
access control you expect or desire for the new file.