Skip to main content

A good way to do this comparison is to use "find"find with "md5sum"md5sum, then a "diff"diff.

Example:

Use findfind to list all the files in the directory then calculate the md5 hash for each file and pipe it to a file:

$find /dir1/ -type f -exec md5sum {} \; > dir1.txt

find /dir1/ -type f -exec md5sum {} \; > dir1.txt

Do the same procedure to the another directory:

$find /dir2/ -type f -exec md5sum {} \; > dir2.txt

find /dir2/ -type f -exec md5sum {} \; > dir2.txt

Then compare the result two files with "diff":

$diff dir1.txt dir2.txt

diff dir1.txt dir2.txt

This strategy is very useful when the two directories to be compared are not in the same machine and you need to make sure that the files are equal in both directories.

Another good way to do the job is using git

git diff --no-index dir1/ dir2/

Best regards!

A good way to do this comparison is to use "find" with "md5sum", then a "diff".

Example:

Use find to list all the files in the directory then calculate the md5 hash for each file and pipe it to a file:

$find /dir1/ -type f -exec md5sum {} \; > dir1.txt

Do the same procedure to the another directory:

$find /dir2/ -type f -exec md5sum {} \; > dir2.txt

Then compare the result two files with "diff":

$diff dir1.txt dir2.txt

This strategy is very useful when the two directories to be compared are not in the same machine and you need to make sure that the files are equal in both directories.

Another good way to do the job is using git

git diff --no-index dir1/ dir2/

Best regards!

A good way to do this comparison is to use find with md5sum, then a diff.

Example:

Use find to list all the files in the directory then calculate the md5 hash for each file and pipe it to a file:

find /dir1/ -type f -exec md5sum {} \; > dir1.txt

Do the same procedure to the another directory:

find /dir2/ -type f -exec md5sum {} \; > dir2.txt

Then compare the result two files with "diff":

diff dir1.txt dir2.txt

This strategy is very useful when the two directories to be compared are not in the same machine and you need to make sure that the files are equal in both directories.

Another good way to do the job is using git

git diff --no-index dir1/ dir2/

Best regards!

added 71 characters in body
Source Link

A good way to do this comparison is to use "find" with "md5sum", then a "diff".

Example:

Use find to list all the files in the directory then calculate the md5 hash for each file and pipe it to a file:

$find /dir1/ -type f -exec md5sum {} \; > dir1.txt

Do the same procedure to the another directory:

$find /dir2/ -type f -exec md5sum {} \; > dir2.txt

Then compare the result two files with "diff":

$diff dir1.txt dir2.txt

This strategy is very useful when the two directories to be compared are not in the same machine and you need to make sure that the files are equal in both directories.

Another good way to do the job is using git

git diff --no-index dir1/ dir2/

Best regards!

A good way to do this comparison is to use "find" with "md5sum", then a "diff".

Example:

Use find to list all the files in the directory then calculate the md5 hash for each file and pipe it to a file:

$find /dir1/ -type f -exec md5sum {} \; > dir1.txt

Do the same procedure to the another directory:

$find /dir2/ -type f -exec md5sum {} \; > dir2.txt

Then compare the result two files with "diff":

$diff dir1.txt dir2.txt

This strategy is very useful when the two directories to be compared are not in the same machine.

Best regards!

A good way to do this comparison is to use "find" with "md5sum", then a "diff".

Example:

Use find to list all the files in the directory then calculate the md5 hash for each file and pipe it to a file:

$find /dir1/ -type f -exec md5sum {} \; > dir1.txt

Do the same procedure to the another directory:

$find /dir2/ -type f -exec md5sum {} \; > dir2.txt

Then compare the result two files with "diff":

$diff dir1.txt dir2.txt

This strategy is very useful when the two directories to be compared are not in the same machine and you need to make sure that the files are equal in both directories.

Another good way to do the job is using git

git diff --no-index dir1/ dir2/

Best regards!

Source Link

A good way to do this comparison is to use "find" with "md5sum", then a "diff".

Example:

Use find to list all the files in the directory then calculate the md5 hash for each file and pipe it to a file:

$find /dir1/ -type f -exec md5sum {} \; > dir1.txt

Do the same procedure to the another directory:

$find /dir2/ -type f -exec md5sum {} \; > dir2.txt

Then compare the result two files with "diff":

$diff dir1.txt dir2.txt

This strategy is very useful when the two directories to be compared are not in the same machine.

Best regards!