ssum - Set file checksum∕message-digest attributes
ssum
[ -a
algorithm]
[ -C
]
[ -d
]
[ -e
]
[ -f
]
[ -F
]
[ -g
]
[ -G
]
[ -h
value]
[ -u
]
filename…
ssum
[ -a
algorithm]
[ -C
]
[ -d
]
[ -e
]
[ -f
]
[ -F
]
[ -g
]
[ -G
]
[ -h
value]
[ -u
]
-r
dirname… |[filename…]
SUNWsamfs
ssum
sets the checksum∕message-digest attributes on one or more files. If the
generate attribute option is specified (-g
), a
checksum∕message-digest value is calculated when the file is
archived. When the file is subsequently staged, the
checksum∕message-digest is again calculated and is
compared against the value calculated at archive time if the
use attribute options is set (-u
). By default,
no checksum∕message-digest value is generated or used when archiving or
staging a file.
The generate hash
option, (-G
), immediately sets
the generate attribute after calculating
the message-digest for the file. If the hash value option is
specified, its value is compared against the computed value and,
if the values do not match, the command fails with an error.
Consider setting the use attribute by setting -u
in
conjunction with -G
to ensure that the message-digest hash
value is used by the stager and archiver.
The fixity
, (-F
), option behaves similar as the
generate hash
option but it also sets the use attribute
and makes the file immutable after the
checksum∕message-digest has been set in the file.
This option can only be specified for a regular file but cannot be
used on a segmented file.
The generate attribute must be set on a file before any archive copy has been made. Likewise, the selected algorithm cannot be changed after an archive copy has been made.
Direct access (stage -n
) and partial release (release -p
)
are not allowed on a file that has the checksum∕message-digest use
attribute set. Also, it is not valid to specify that a file never be
archived (archive -n
) as well as specify that a checksum∕message-digest
be used. Therefore, when a direct access, partial release, or archive
never attribute is set on a file, attempting to set the
checksum∕message-digest generate or use attribute on the file
will result in an error and the attributes will be unchanged. Similarly,
when either the checksum∕message-digest generate or use
attribute is set on a file, attempting to set a direct
access, partial release, or archive never attribute on the file will result
in an error and the attributes will be unchanged.
A file that has the checksum∕message-digest use attribute set cannot
be memory mapped.
The file also must be completely staged to the disk before access is allowed
to the file's data. This means that accessing the first byte of offline
data in an archived file that
has this attribute set will be slower than accessing the
same archived file when it does not have this attribute set.
This also means that staging will operate the same way as for staging
with the -w
option for a file with the use attribute not set.
-a
algorithmSet the message-digest algorithm for the file(s). When this option is not specified the legacy 128-bit algorithm is used. The algorithm value must be one of the following. The value is case-insensitive and special characters may be omitted.
LEGACY
Use the legacy 128-bit checksum v2 algorithm.
MD5
Use the 128-bit MD5 message-digest algorithm.
SHA-1
Use the 160-bit SHA-1 message-digest algorithm.
SHA-256
Use the 256-bit SHA-256 message-digest algorithm.
SHA-384
Use the 384-bit SHA-384 message-digest algorithm.
SHA-512
Use the 512-bit SHA-512 message-digest algorithm.
For example, values of SHA-512, SHA512, sha-512 and sha512 are equivalent.
-C
Turn off the valid attribute for the file and clear the algorithm number; this also turns off the checksum∕message-digest generation and use attributes. Only a superuser can perform this operation. If the file has the fixity attribute set, it cannot be set back to defaults.
-d
Return the file's checksum∕message-digest attributes to the default, which turns off their generation and use attributes. Using the -d option will not reset the valid attribute if a valid checksum∕message-digest has been generated for a file. The -d option deletes the checksum∕message-digest attributes, if no valid checksum∕message-digest has been generated. If the file has the fixity attribute set, it cannot be set back to defaults.
-e
Set data verification for the file or directory specified. This forces the generation and use of checksums∕message-digests for archiving and staging, and prevents the release of the file until all archive copies have been created and their checksums∕message-digests verified. A file with only one archive copy will never be released. Only a superuser can set this attribute on a file.
Files created in directories with the -e attribute set inherit it.
-f
Do not report errors.
-r
Recursively set the attributes for any files contained in the specified dirname and its subdirectories. This option cannot be specified with a hash value, (-h).
-g
Set a file's generate attribute so a checksum∕message-digest value for is generated when the file is archived.
-u
This options sets a file's use attribute that causes the file's checksum∕message-digest hash value to be validated when a file is stager. The generate attribute must have been previously set, or must be set simultaneously.
-G
The generate hash
option causes the file's message-digest
hash or legacy checksum value to be immediately calculated. It sets the
generate attribute for the file after the calculation. If a hash
value option, -h
, was supplied that value is compared against the
one calculated. If they do not match, the command terminates with an
error. The file must be online to perform this operation.
The algorithm
must be specified with this option.
You must be root to immediately generate a legacy checksum.
This option can only be specified for a regular file but cannot be
used on a segmented file.
-F
This option is used to set the fixity attribute for the
file. It is similar in functionality to the (-G
) option with the
additional requirement that the algorithm
must be specified.
After the message-digest hash value has been calculated and
verified against the known hash value, the file's
use attribute is set (if specified) and the file is marked immutable.
This option can only be specified for a regular file but cannot be
used on a segmented file.
-h
valueThis option is used with the fixity
and generate hash
options. Its value is a string of case-insensitive hexadecimal
characters, 0-9 and A-F.