Posted By

alejandrosuch on 06/17/10


Tagged

dir diff cmp


Versions (?)

Recursive dir comparison


 / Published in: Bash
 

URL: http://troxa.com/comparacion-recursiva-de-directorios-en-linux.html

  1. #! /bin/bash
  2. #
  3. # cmpdir - [email protected], 2007, GPLv2
  4. #
  5. # cmpdir <dir1> <dir2>
  6. [ -z "$2" ] && { echo “Usage: $SELF <dir1> <dir2>”; exit 0; }
  7. SRC=”$1
  8. DST=”$2
  9. (cd$SRC”;find -type f)|while read i;do cmp$SRC/$i” “$DST/$i”; done

Report this snippet  

You need to login to post a comment.