home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / utlos2.zip / Doc / CRC.DOC < prev    next >
Text File  |  1997-10-24  |  3KB  |  70 lines

  1. $Id: CRC.DOC 1.3 1997/10/25 02:11:00 brian Exp $
  2.  
  3.                       crc.doc : The 'crc' command
  4.                           By:  Brian E. Yoder.
  5.  
  6.         (c) Copyright International Business Machines Corporation 1997
  7.         All rights reserved.
  8.  
  9. The crc command is used to record the length and 16-bit CRC value (or,
  10. optionally, the 32-bit CRC value) for one or more files.
  11.  
  12. The code used to calculate the 16-bit CRC value for an individual file
  13. was developed at IBM Austin, Texas, by Jim Czenkusch. The code to
  14. calculate the 32-bit CRC has enhancements to pre- and post-condition
  15. each value so that it is compatible with the 32-bit CRC value generated
  16. by PKWARE's PKZIP and Info-ZIP's zip programs.
  17.  
  18. ========================================================================
  19. Command syntax
  20. ========================================================================
  21.  
  22.         crc [ -s ] [ -l ] fspec ...
  23.  
  24. The program gets the length and calculates the CRC value for each file
  25. that matches the given file specification(s). If -s is specified, then
  26. the program recursively descends into subdirectories looking for files
  27. that match the file specification(s).
  28.  
  29. If -l (letter el) is specified, then crc generates 32-bit (long) CRCs
  30. that are compatible with those generated by PKZIP. The default is to
  31. generate 16-bit CRCs.
  32.  
  33. Each file specification consists of some combination of drive, path, and
  34. filename. The filename may contain AIX shell pattern-matching
  35. characters. See the pattern.doc file for a description of filename
  36. pattern matching.
  37.  
  38. For each matching file, the crc program writes one line to standard
  39. output as follows:
  40.  
  41.         length  CRC  "filename"
  42.  
  43. The length is displayed in decimal format. The CRC is displayed in
  44. hexadecimal format with a leading '0x'. The filename is enclosed in
  45. double quotes in case it contains embedded spaces or other puncutation.
  46.  
  47. ========================================================================
  48. Examples:
  49. ========================================================================
  50.  
  51. 1. I entered the following command on my system (a very long time ago, I
  52.    might add!):
  53.  
  54.                 crc *.h \*.sys
  55.  
  56.    It produced the following output:
  57.  
  58.                 3159  0xD65B  BMTBL.H
  59.                10780  0x5495  UTIL.H
  60.                15473  0x064B  REGEXP.H
  61.                  178  0x4E87  \CONFIG.SYS
  62.  
  63. 2. I entered the following command on my system:
  64.  
  65.                 crc -l crc.doc
  66.  
  67.    It produced the following output:
  68.  
  69.                 2409  0x070E5D3F  CRC.DOC
  70.