rsync compares files only by their sizes and modification times. -c flag needs to be specified. rsync -av --delete $SRC $DEST
-a turns on archive mode (recursive copy and preserving certain attributes of the source). -v turns on increased verbosity --delete deletes files in $DEST that are not present in $SRC.