Table 6-5: md5sum command – Kontron COMe-cP2020 User Manual
Page 84
www.kontron.com
COMe-P2020 User Guide
84
Table 6-5:
md5sum Command
md5
sum
Creates or checks the md5 message digest over a memory area
SYNTAX:
md5sum
md5sum
command
parameter: hexadecimal
start address of memory area
parameter: hexadecimal
length of memory area
parameter: hexadecimal
If present: compares the calculated md5 message digest with the md5 message
digest available at this address.
If absent: calculates the md5 message digest over the specified memory range and
prints it to the console.
DESCRIPTION: This command is used to create or check the md5 message digest over a memory area.
If the optional 3
rd
parameter
the specified memory range and printed to the console.
If the optional 3
rd
parameter
specified memory range and compared with the md5 message digest at
identical, the command returns 0; if the digests do not match, a value other than zero is returned. When a
comparison is made, nothing is printed to the console since this usage of the command is meant to be used
within scripts.
The md5 message digest at
USAGE: 1. Calculate an md5 message digest:
=> md5sum 100000 80000
8fe7006660a2df2265b7cd707eb98786
=>
2. Check the md5 message digest of a file previously loaded to 100000 with a size of 80000 and its md5
message digest loaded to 10000 in a script
=> setenv check_crc “if md5sum 100000 80000 10000; then echo ‘md5
message digest OK’; else echo ‘md5 message digest BAD’; fi”
=>run check_crc
md5 message digest OK
=>