SAMPLE(L)							     SAMPLE(L)



NAME
       mkpdssum - Make an MD5 checksum file for a PDS volume or directory tree

SYNOPSIS
       mkpdssum	 [-f] [-p] [-l |-u] [-v VOLUME_ID]  [-x string] [ root_dir ]

DESCRIPTION
       mkpdssum creates the required CHECKSUM.TAB and  CHEKSUM.LBL  files  for
       PDS  volumes.   It  can	also  be used to create checksum files for any
       directory tree.

       The output checksum file is in the style produced by  common  utilities
       such as 'md5sum', but uses the Perl Digest::MD5 module to calculate the
       checksums and sorts the list on file path and name.  The root directory
       is  not included in the output file specifications.  The resulting file
       can be used as input to utilities like 'chkpdssum' or 'md5sum' to check
       for file corruption.

       If  no  root_dir	 is  included on the command line, the current working
       directory is taken as the root.	The -x option can be used  to  exclude
       paths  and/or files that match the given string, and can be repeated as
       many times as desired.

       mkpdssum checks for the existence of an "index/"	 subdirectory  in  the
       root  directory	given  on the command line.  If one is found, mkpdssum
       assumes it is working on a  PDS	volume	and  writes  its  output  file
       'checksum.tab' and a corresponding PDS label file called 'checksum.lbl'
       in the index/ subdirectory.  File name case will match the case of  the
       actual  index  directory	 name.	 So, for example, if mkpdssum finds an
       "INDEX/" subdirectory, it will create output files "INDEX/CHECKSUM.TAB"
       and  "INDEX/CHECKSUM.LBL".   If	it  finds  "index/",  it  will	create
       "index/checksum.tab" and "index.checksum.lbl".  In either case, the ta-
       ble  file  will	have fixed-length records with carriage rturn/linefeed
       record delimiters, as will the accompanying label file.

       If an index subdirectory was found, mkpdssum will also check in th root
       directory  for  a  'voldesc.cat'	 (or  'VOLDESC.CAT') file, in order to
       retrieve the VOLUME_ID for use in the label file.

       If no index subdirectory is found, mkpdssum will create a  file	called
       "checksum.tab" in the current working directory.	 this file will not be
       padded and will not have an accompanying label.

       All files unde to root directory	 excluding  directory  files  and  the
       checksum	 table and label files themselves will be included in the out-
       put checksum table.

OPTIONS
       -f     Follow symbolic links.  This uses the  "follow_fast"  option  to
	      optimize time and space, and will detect circular links, but not
	      multiply-linked files.  -u Force file names to upper case in the
	      output  checksum	table.	Default is to leave the case as found.
	      If both -u and -l are included, both will be ignored.  This will
	      also  force  the output checksum file name to be upper case when
	      not working in a PDS volume structure.

       -l     Force file names to lower case in	 the  output  checksum	table.
	      Default  is  to  leave the case as found.	 If both -u and -l are
	      included, both will be ignored.

       -p     Produce just a plain checksum listing file, without padding or a
	      PDS  label,  regardless  of  whether  an	index/ subdirectory is
	      found.

       -v VOLUME_ID
	      Use the given string as the  VOLUME_ID  in  the  label  for  the
	      checksum	table.	 This will override any value found in a vold-
	      esc.cat file.  This option is ignored if a label is not produced
	      (i.e., if there is no index/ subdirectory or if the -p option is
	      used).

       -x string
	      Exclude files whose paths or names contain "string".  All	 files
	      and  oaths  that	match the string at any point will be excluded
	      from the output file listing.  Only one string may be  specified
	      with  each -x option, but the option may be repeated on the com-
	      mand line as many times as needed.

NOTES
       This routine uses the Perl Digest::MD5 module to	 calculate  the	 check
       sums.

       Output is formatted so that it can be used as input to the standard MD5
       routines such as 'md5sum' to check a file set, as well as  the  comple-
       mentary mkpdssum does not attempt to indicate binary mode files as, for
       example, the md5sum utility does.



			       16 November 2006			     SAMPLE(L)
