home *** CD-ROM | disk | FTP | other *** search
/ Aminet 10 / aminetcdnumber101996.iso / Aminet / util / shell / dircmp2.lha / dircmp2.doc < prev    next >
Text File  |  1995-11-03  |  2KB  |  88 lines

  1.   dircmp2 Command
  2.   
  3.   
  4.   Purpose
  5.   
  6.   Compares the contents two directories
  7.   
  8.    Syntax
  9.   
  10.   dircmp2 [ -{cdfhiprt} ] Directory1 [ Directory2 ]
  11.   
  12.   Description
  13.  
  14.   The dircmp2 command compares the two directories and lists all files
  15.   and directories that are found in Directory1 but not in Directory2
  16.   to stdout. Directory entries are treated as equal, if they have the
  17.   same name. If Directory2 is omitted, then the current directory is
  18.   taken.
  19.  
  20.   Flags
  21.  
  22.   -c    Compares files found in both directories to decide wheather
  23.     they are equal or not. This is a bytewise comparison
  24.  
  25.   -d    Displays only directories
  26.  
  27.   -f    Displays only files
  28.  
  29.   -h    Displays help page
  30.  
  31.   -i    Invert operation, i.e. lists files and directories that can be
  32.     found in both Directory1 and Directory2
  33.  
  34.   -p    Shows full pathnames of files from Directory1. See 'Notes'
  35.  
  36.   -r    Scans subdirectories, i.e. recursive operation
  37.  
  38.   -t    Indents results from a subdirectory scan
  39.  
  40.   Exit Status
  41.  
  42.   This command returns the following exit values:
  43.  
  44.   0    Successful completion.
  45.  
  46.   20    An error occurred.
  47.  
  48.   Notes
  49.  
  50.   (I)    dircmp2 -i dir1 dir2 is the same as dircmp2 -i dir2 dir1, but
  51.   dircmp2 -i -p dir1 dir2 is NOT the same as dircmp2 -i -p dir2 dir1.
  52.   This can be of vital importance, e.g. if you remove (rm) identical
  53.   files from the list, make sure to remove them from the right
  54.   directory (pathnames are always given for the first directory).
  55.  
  56.   (II)    Without -c flag, contents of files with identical names will
  57.   not be compared.
  58.  
  59.   (III)    The dircmp2 command differs from the standart implementation
  60.   (dircmp) in the following ways:
  61.  
  62.       (i)    The dircmp options are not recognized or have a
  63.     different meaning.
  64.  
  65.       (ii)    The dircmp2 command is not able to produce diff-style
  66.     output.
  67.  
  68.       (iii)    The dircmp2 command shows only files and directories
  69.     from Directory1. See the note above.
  70.  
  71.   (IV)    In recursive operation, i.e. -r flag set, directory names
  72.   will not be shown with one exception: If one or more subdirectories
  73.   are not found in Directory2, only their names are shown, not the
  74.   files they contain.
  75.  
  76.   Examples
  77.  
  78.   1.    dircmp2 -d dir1 dir2
  79.   List all subdirectories of dir1 that cannot be found in dir2
  80.  
  81.   2.    dircmp2 -i -r -t .
  82.   List all identical contents of both the current directory and its
  83.   subdirectories with indentation. Direcory names are not shown
  84.  
  85.   3.    dircmp2 -f -c -i -p dir1 dir2
  86.   List all files identical in dir1 and dir2 with the pathname of
  87.   dir1
  88.