简体   繁体   中英

How find word differences in files with very big lines

My question is if there is a tool in linux to find the difference in two files with lines so big as 39604 chars.

I tried with vimdiff, kompare, diff, colordiff, wdiff and other tools and none of them show me the exact difference.

All of them show the line, but is too long that is very hard to check which char is different and only after I found the position I can see it in vimdiff, that shows the difference (was a space at end). But I didn't find it because is very hard to go through all line.

But I would like to know if there is a faster way to compare this case or similar.

Thanks in advance.

At end I found the difference loading two files with gedit, advancing both page per page and check if there are differences. Because I didn't find any difference I checked if the last char was a space and that was the difference and I got it..

Surfing I found a good solution at https://unix.stackexchange.com/questions/45711/diff-reports-two-files-differ-although-they-are-the-same

"What if you hexdump them? This might show differences more obviously, eg:"

hexdump -C file1 > file1.hex
hexdump -C file2 > file2.hex
diff file1.hex file2.hex

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM