What if files have same name?

069

If files with the same name exist in different directories when using the diff -r command, diff will compare the contents of those files and report any differences. The output will indicate the paths of the files being compared, so you can see which files with the same name are being analyzed.

For example, if you have the following structure:

dir1/file.txt
dir2/file.txt

And you run:

diff -r dir1 dir2

diff will compare dir1/file.txt with dir2/file.txt and show the differences if there are any. If the files are identical, it will not report anything for that file.

0 Comments

no data
Be the first to share your comment!