Did you try --speed-large-files
switch to diff
? It should waste less memory:
diff --speed-large-files [...]
From manual page for diff
:
--speed-large-files
assume large files and many scattered small changes
Я хочу найти различия между двумя текстовыми файлами (более 50 ГБ) каждый.
Я пытался, diff
но у меня memory exhausted
проблема.
Я использую Windows7. Мой код на PHP. Я звонил diff из моего php как:
shell_exec("C:\\cygwin64\\bin\\bash.exe --login -c 'diff $text_files_path/$OldDatabaseFile.txt $text_files_path/$NewDatabaseFile.txt > $text_files_path/TempDiff_$OldDatabaseFile$NewDatabaseFile.txt 2>&1'");
Кто-то рассказал мне о rdiff
том, что генерирует подпись и дельта, но я не проверял это, потому что я не знаю, как начать.
Откуда я могу его установить? Откуда я могу его запустить? Из windows cmd или cygwin cmd?
Did you try --speed-large-files
switch to diff
? It should waste less memory:
diff --speed-large-files [...]
From manual page for diff
:
--speed-large-files
assume large files and many scattered small changes
rdiff
)?Someone told me about
rdiff
that generates signature and delta but, I did not test it because I do not know how to begin. From where can I install it? and from where can I run it? From windowscmd
or cygwin cmd?
Cygwin includes rdiff
. It is in the rdiff-1.0.0-1
package.
rdiff
)?Someone told me about
rdiff
that generates signature and delta but, I did not test it because I do not know how to begin. From where can I install it? and from where can I run it? From windowscmd
or cygwin cmd?
You run rdiff
a Cygwin bash
shell.
shell_exec("C:\\cygwin64\\bin\\bash.exe --login -c 'diff $text_files_path/$OldDatabaseFile.txt $text_files_path/$NewDatabaseFile.txt > $text_files_path/TempDiff_$OldDatabaseFile$NewDatabaseFile.txt 2>&1'");
A command similar to the above (replacing diff
with rdiff
and modifying the command options as necessary) should work.
rdiff
is in?The easiest way to find the package containing a particular command is to use Cygwin Package Search web page:
Scroll to the bottom of the page:
Click on rdiff-1.0.0-1:
This confirms that rdiff-1.0.0-1
is the correct package to install.
See Installing and Updating Cygwin Packages for installation instructions.