94 lines · 1.5 KB · Text
RawDownload
.TH SUM 1.SH NAMEsum, md5sum, sha1sum \- sum and count blocks in a file.SH SYNOPSIS.B sum[.B -5r][.I file ...].PP.B md5sum[.I file ...].PP.B sha1sum[.B -2.I bits] [.I file ...].SH DESCRIPTIONBy default,.I sumcalculates and prints a 32-bit hexadecimal checksum,a byte count,and the name ofeach.IR file .The checksum is also a function of the input length.If no.IR file sare given,the standard input issummed.Other summing algorithms are available.The options are.TF -r.PD.TP.B -rSum with the algorithm of System V's.B "sum -r"and print the length (in 1K blocks) of the input..TP.B -5Sum with System V's default algorithmand print the length (in 512-byte blocks) of the input..PP.I Sumis typically used to look for bad spots,to validate a file communicated oversome transmission line oras a quick way to determine if two files on different machines might be the same..PP.I Md5sumcomputes the 32 hex digit RSA Data Security, Inc. MD5 Message-Digest Algorithmdescribed in RFC1321..PP.I Sha1sumcomputes the 40 hex digit National Institute of Standards and Technology(NIST)SHA1 secure hash algorithmdescribed in FIPS PUB 180-1,by default.Given the.L 2option,it instead computes the.IR bits -bitNIST SHA2 secure hash algorithmdescribed in FIPS PUB 180-2and prints the hash in hex.Currently supported values of.I bitsare224,256,384,and512..SH SOURCE.B /sys/src/cmd/sum.c.br.B /sys/src/cmd/md5sum.c.br.B /sys/src/cmd/sha1sum.c.SH "SEE ALSO".IR cmp (1),.IR wc (1),.IR sechash (2)