Menu

Creating dircmp command

Help
2004-12-22
2012-07-26
  • Yannick Lefebvre

    Hello,

    I have been using various parts of the Gnuwin32 project. One Unix command that I find is missing is the dircmp command which compares the contents of two directories, telling you if files are identical at a binary level.

    Does this utility exist and I just missed it? Otherwise, I would suggest that it should be created and added to the difftools package.

    Thanks for the great tools,

    Yannick

     
    • GnuWin

      GnuWin - 2004-12-22

      Dircmp is deprecated; see http://www.opengroup.org/onlinepubs/007908799/xcu/dircmp.html
      Use diff -r instead.

       
      • Nobody/Anonymous

        C:\WBIN>diff --binary -q -s update update2
        Files update\cat.exe and update2\cat.exe are identical
        Files update\cksum.exe and update2\cksum.exe are identical
        Files update\comm.exe and update2\comm.exe are identical
        Files update\csplit.exe and update2\csplit.exe are identical
        Files update\cut.exe and update2\cut.exe are identical
        Files update\expand.exe and update2\expand.exe are identical
        Files update\fmt.exe and update2\fmt.exe are identical
        Files update\fold.exe and update2\fold.exe are identical
        Files update\gawk.exe and update2\gawk.exe differ
        Files update\grep.exe and update2\grep.exe differ
        Files update\head.exe and update2\head.exe are identical
        Files update\join.exe and update2\join.exe are identical
        Only in update2: less.exe
        Only in update2: lesskey.exe
        Only in update2: make.exe
        Files update\md5sum.exe and update2\md5sum.exe are identical
        Files update\nl.exe and update2\nl.exe are identical
        Files update\od.exe and update2\od.exe are identical
        Files update\paste.exe and update2\paste.exe are identical
        Files update\pr.exe and update2\pr.exe are identical
        Files update\ptx.exe and update2\ptx.exe are identical
        Files update\sed.exe and update2\sed.exe differ
        Files update\sha1sum.exe and update2\sha1sum.exe are identical
        Files update\sort.exe and update2\sort.exe differ
        Files update\split.exe and update2\split.exe are identical
        Files update\sum.exe and update2\sum.exe are identical
        Files update\tac.exe and update2\tac.exe are identical
        Files update\tail.exe and update2\tail.exe are identical
        Files update\tr.exe and update2\tr.exe are identical
        Only in update2: tsort.exe
        Files update\unexpand.exe and update2\unexpand.exe are identical
        Files update\uniq.exe and update2\uniq.exe are identical
        Files update\wc.exe and update2\wc.exe are identical
        Files update\zsh.exe and update2\zsh.exe differ

        William Madden

         
    • Yannick Lefebvre

      Thanks for the information.

       
    • Yannick Lefebvre

      Is there a way to get diff -r to just say if files are identical or different without showing the actual differences?

       
    • Yannick Lefebvre

      OK, I have found how to get the same output as dircmp: diff -r -q -s

       
MongoDB Logo MongoDB