Operating System - HP-UX
1825747 Members
2835 Online
109687 Solutions
New Discussion

What cause diff command hang?

 
SOLVED
Go to solution
Camel_1
Valued Contributor

What cause diff command hang?

I was trying to diff 2 C program, their file size is approx 443K. When I run the diff command it just hang and the prompt not return. I checked glance the process using high CPU load. What is the possible cause the diff command hang.

Thank you,

Simon
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: What cause diff command hang?

Most likely you are not up to date on patches having to do with performance, perhaps the recent shell upgrade for security reasons needs to be installed.

I would first take a quarterly bundle you are comfortable with, December 2003 for 11 or 11.11 (You don't specify) get that installed.

Search the itrc.hp.com patch database for hang patches, maybe install those.

Also, look at your keyboard log and make sure you didn't accidentlly past in an unprintable character that caused the hang.

Is it consistent, ie can you reproduce?

Those files are kind of big. I usually use diff on smaller files, scripts datafiles and the like.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
A. Clay Stephenson
Acclaimed Contributor

Re: What cause diff command hang?

I suspect that these are C executables rather than C source code. Diff is not really good at handling binary files so I suspect that your diff is hung in a loop.

If all you want to do is compare two binary files to see if they are identical, use the cksum command.
If it ain't broke, I can fix that.
Camel_1
Valued Contributor

Re: What cause diff command hang?

They are C source programs ....
Michael Tully
Honored Contributor

Re: What cause diff command hang?

I would not be using 'diff' to compare any type of binary. The most likely command is 'cksum'. The source code is the place to check for differences in text. You could also use 'strings' to read some of the ascii.
Anyone for a Mutiny ?
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: What cause diff command hang?

In that case, I would look for the latest diff patch appropriate to your OS OR you might try using bdiff to see it it works better.
If it ain't broke, I can fix that.
Camel_1
Valued Contributor

Re: What cause diff command hang?

bdiff is good, the result post up immediately. Interesting the file is not too big.

Thanks anyway,

Simon