Problem with bdiff


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Problem with bdiff
# 1  
Old 07-13-2006
Question Problem with bdiff

I need compare two files and bdiff cut my file and use diff to compare but Because of the segmenting of the files, bdiff does not necessarily find a smallest sufficient set of file differences.

there are another utiliy?

thanks Smilie
# 2  
Old 07-14-2006
Okay. I do not understand. bdiff is for really big files and gives the same output as does diff. So why use diff?

Tell us what you really want to do. Not what you think is how to do it?
# 3  
Old 07-14-2006
the big problem

its simple. I want to get the difference of two files.
diff have limitations about the size of the file.
bdiff cut my file in small files and use diff to compare. so for example:

two big files with numbers:
File a file b
1 3
2 6
3 7
5 8
6 9
7 1

Big diff cut the files like these

File a1 File b1
1 3
2 6
3 7

File a2 File b2
5 8
6 9
7 1

and use diff to compare a1 with b1 and a2 with b2
and the result is
1
2
6
7
5
8
9



like the man bdiff says : "The output of bdiff is exactly that of diff, with line numbers adjusted to account for the segmenting of the files
(that is, to make it look as if the files had been processed
whole). Note: Because of the segmenting of the files, bdiff
does not necessarily find a smallest sufficient set of file
differences.
"

http://www.csee.usf.edu/cgi-bin/man-cgi?bdiff+1

i hope that you understand my problem.
# 4  
Old 07-14-2006
I still don't know what your goal is. Unless you are trying to use diff output to automate an ed script, it will not make any difference.

However, use split to cut large files down. Assume your largefile limit starts at 2 GB.
2147483647 bytes try something like this.

Code:
#!/bin/ksh

split -n 2147483646 ./file1  /tmp/file1
split -n 2147483646 ./file2  /tmp/file2
> ./difflog
find /tmp -name 'file1*' | \
while read smallfilename
do
    let pos=${#smallfilename}
    let pos=$pos-2
    last_two_letters=`expr substr $smallfilename $pos 2`
    diff $smallfilename "/tmp/file2""$last_two_letters"
done > ./difflog

This runs diff on the largest file chunk possible.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. IP Networking

Router problem or ISP problem ?

Hi everyone, I am experiencing discontinuity of Internet service, this started 1 month ago. Everything worked very well for 1 year of intensive use, but now, I have problems reaching my gateway. The gateway is not my router but a node belonging to my ISP and I share the same public IP with... (3 Replies)
Discussion started by: remic
3 Replies

2. UNIX for Dummies Questions & Answers

sed Or Grep Problem OR Terminal Problem?

I don't know if you guys get this problem sometimes at Terminal but I had been having this problem since yesterday :( Maybe I overdid the Terminal. Even the codes that used to work doesn't work anymore. Here is what 's happening: * I wanted to remove lines containing digits so I used this... (25 Replies)
Discussion started by: Nexeu
25 Replies

3. IP Networking

Problem with forwarding emails (SPF problem)

Hi, This is rather a question from a "user" than from a sys admin, but I think this forum is apropriate for the question. I have an adress with automatic email forwarding and for some senders (two hietherto), emails are bouncing. This has really created a lot of problems those two time so I... (0 Replies)
Discussion started by: carwe
0 Replies

4. AIX

AIX OS problem? network problem?

Dear ALL. I installed AIX OS on customer sites. but Only one site is too slow when I connected telnet, ftp.. Ping is too fast. but telnet and FTP is not connected.. of course i check the configuration file on aix but it's normal. Do any Idea?? thanks in advance. - Jun - (3 Replies)
Discussion started by: Jeon Jun Seok
3 Replies

5. Red Hat

Mail Problem. Maybe, it is a DNS Problem!

Hi, i've a redhat linux 9 upadated by redhat from 7 version to 9 version. A couple of days ago i was a problem with my mail, in other words i'm not able to get any email nor to send any email. I've a proxy configuration and i tried to set iptables in order to verify the port. The 110,255 and 995... (1 Reply)
Discussion started by: pintalgi
1 Replies

6. AIX

user login problem & Files listing problem.

1) when user login to the server the session got colosed. How will resolve? 2) While firing the command ls -l we are not able to see the any files in the director. but over all view the file system using the command df -g it is showing 91% used. what will be the problem? Thanks in advance. (1 Reply)
Discussion started by: pernasivam
1 Replies

7. Shell Programming and Scripting

ssh script problem problem

Hi Please help me with the following problem with my script. The following block of code is not repeating in the while loop and exiting after searching for first message. input_file ========== host001-01 host001-02 2008-07-23 13:02:04,651 ConnectionFactory - Setting session state... (2 Replies)
Discussion started by: pcjandyala
2 Replies

8. Shell Programming and Scripting

problem with dd command or maybe AFS problem

Hi, folks. Sorry for bothering, but maybe someone could help me please. The problem is the following: there is some script that copies files from local file system to AFS. The copying is performed with dd command. The script copies data into some AFS volumes. The problem appeared with one... (0 Replies)
Discussion started by: Anta
0 Replies

9. UNIX for Dummies Questions & Answers

bdiff compare issue

I am trying to determine a cksum of a file without header information. I know sum of the file before I transfer to another machine. I wont to transfer only a number and not a whole file in order to determine if file changed. If I transfer whole file then I run, bdiff report no differences. Based... (0 Replies)
Discussion started by: ftrust
0 Replies

10. UNIX for Advanced & Expert Users

SSH Problem auth problem

Hi, Just recently we seem to be getting the following error message relating to SSH when we run the UNIX script in background mode: warning: You have no controlling tty. Cannot read confirmation.^M warning: Authentication failed.^M Disconnected; key exchange or algorithm negotiation... (1 Reply)
Discussion started by: budrito
1 Replies
Login or Register to Ask a Question