cksum.1 (2cbd69330dae924bec2e53d2b1b2ab9fd9a6b608) | cksum.1 (68d8bb3893ae5a7e96bcc5f5b6f0d430dda0216a) |
---|---|
1.\" Copyright (c) 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" This code is derived from software contributed to Berkeley by 5.\" the Institute of Electrical and Electronics Engineers, Inc. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions --- 19 unchanged lines hidden (view full) --- 28.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" SUCH DAMAGE. 34.\" 35.\" @(#)cksum.1 8.2 (Berkeley) 4/28/95 | 1.\" Copyright (c) 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" This code is derived from software contributed to Berkeley by 5.\" the Institute of Electrical and Electronics Engineers, Inc. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions --- 19 unchanged lines hidden (view full) --- 28.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" SUCH DAMAGE. 34.\" 35.\" @(#)cksum.1 8.2 (Berkeley) 4/28/95 |
36.\" $Id: cksum.1,v 1.4 1997/06/25 07:02:00 charnier Exp $ | 36.\" $Id: cksum.1,v 1.5 1997/07/06 03:03:06 bde Exp $ |
37.\" 38.Dd April 28, 1995 39.Dt CKSUM 1 40.Os BSD 4.4 41.Sh NAME 42.Nm cksum 43.Nd display file checksums and block counts 44.Sh SYNOPSIS --- 48 unchanged lines hidden (view full) --- 93algorithm. 94This is a 32-bit checksum, and is defined as follows: 95.Bd -unfilled -offset indent 96s = sum of all bytes; 97r = s % 2^16 + (s % 2^32) / 2^16; 98cksum = (r % 2^16) + r / 2^16; 99.Ed 100.Pp | 37.\" 38.Dd April 28, 1995 39.Dt CKSUM 1 40.Os BSD 4.4 41.Sh NAME 42.Nm cksum 43.Nd display file checksums and block counts 44.Sh SYNOPSIS --- 48 unchanged lines hidden (view full) --- 93algorithm. 94This is a 32-bit checksum, and is defined as follows: 95.Bd -unfilled -offset indent 96s = sum of all bytes; 97r = s % 2^16 + (s % 2^32) / 2^16; 98cksum = (r % 2^16) + r / 2^16; 99.Ed 100.Pp |
101Algorithm 3 is what is commonly called the 102.Ql 32bit CRC 103algorithm. 104This is a 32-bit checksum. 105.Pp |
|
101Both algorithm 1 and 2 write to the standard output the same fields as 102the default algorithm except that the size of the file in bytes is 103replaced with the size of the file in blocks. 104For historic reasons, the block size is 1024 for algorithm 1 and 512 105for algorithm 2. 106Partial blocks are rounded up. 107.El 108.Pp --- 72 unchanged lines hidden --- | 106Both algorithm 1 and 2 write to the standard output the same fields as 107the default algorithm except that the size of the file in bytes is 108replaced with the size of the file in blocks. 109For historic reasons, the block size is 1024 for algorithm 1 and 512 110for algorithm 2. 111Partial blocks are rounded up. 112.El 113.Pp --- 72 unchanged lines hidden --- |