I am using BeyondCompare 4 on Windows 10 to compare two directories
with thousands of files.
They are the same, but one exported from Windows, and another one from
Linux
The files are not the same which is why Beyond Compare does not see them as the same. (I have and use Beyond Compare).
Windows (DOS) uses CR/LF at the end of line and Unix just uses LF. (LF is / means New Line)
Windows vs Unix end of line
DOS vs. Unix Line Endings Text files created on DOS/Windows machines
have different line endings than files created on Unix/Linux. DOS uses
carriage return and line feed ("\r\n") as a line ending, which Unix
uses just line feed ("\n"). You need to be careful about transferring
files between Windows machines and Unix machines to make sure the line
endings are translated properly.
The CDF staff have written a thorough explanation of converting
between Unix and DOS files
In the directory /u/csc207h/winter/pub/bin, you will find a little
Perl program called dos2unix that will conver DOS line endings to Unix
line endings. You can set your path to include this directory so that
you can run the program, or you can copy it to your own bin directory.
Run the program as dos2unix . The file is
modified.
IMPORTANT: You must submit files in the CVS directory with Unix/Linux
file endings. If you only use CVS to transfer files between your home
machine and CDF, you should not have to worry about line endings.
However, you must test your programs on CDF before you submit them.
Shell programs, in particular, will fail in mysterious ways if they
contain DOS line endings.
Now I also found in the Scooter forums that you can ignore unimportant differences and that may indeed help you.
Ignore Unimportant Differences.
The previous post mentioned is actually requesting to ignore line
endings and compare text regardless of where it breaks.
We fully support both ignoring the line endings, and 'forcing' the
binary compare on the folder compare level without needing to double
click the files.
Here's a quick KB article that should help:
http://www.scootersoftware.com/suppo...ferentthensame
The line ending importance is controlled per session/instance. You can
set a global default from the Home screen -> Edit Session defaults
(green folder in the saved session list), Text Compare. And in the
Importance tab, Compare Line Endings (PC/Mac/Unix) should already be
disabled, which is the default.
The Folder Compare does not use this information by default, however,
and will compare using the attributes timestamp/size for a quick
comparison. You can make this initial scan more detailed in the Folder
Compare Session Settings, and enable a Rules-based compare (same as
double clicking) or a Binary or CRC compare.
Let us know if you have any questions.
![enter image description here](https://cdn.statically.io/img/i.sstatic.net/YlVAK.png)
find . -type f -print0 | xargs -0 unix2dos
on the directory with the UNIX files would solve the problem. But I was expecting a nicer solution...