Comparison between binary files


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Comparison between binary files
# 1  
Old 08-27-2008
Comparison between binary files

Hello,

I would like to know if we can compare binary(non text) files in unix
eg. exes

Thanks

Saurabh
# 2  
Old 08-28-2008
Hammer & Screwdriver Take a look at diff

Below, I copy ots to another location; meaning both files are identical.
The 2nd line diff command returns nothing; confirming that the files are identical.

I then compare two slightly different versions of the file; and get the message that the binary files are different.

Code:
> cp otsort ../cbin2/ots_orig
> diff otsort ../cbin2/ots_orig
> diff ots ots64
Binary files ots and ots64 differ

This User Gave Thanks to joeyg For This Post:
# 3  
Old 08-28-2008
Also check out the cmp command.
# 4  
Old 08-28-2008
Are you trying to get version information? try ident.
If you are trying to see that compiled image files are identical, try md5 or cksum
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Comparison of files

I have the requirement I have two files cat fileA something anythg nothing everythg cat fileB everythg anythg Now i shld use fileB and compare every line at fileA and get the output as something nothing (3 Replies)
Discussion started by: Priya Amaresh
3 Replies

2. Shell Programming and Scripting

Complex comparison of 3 files

Hello to all in forum, May you experts could help me with this complex comparison please. I need to search the numbers in file1 within column3 of file2 and if found, compare column4 to NF of file2 with the lines in file3. If the column4 to NF in file2 match any of the lines in file3,... (5 Replies)
Discussion started by: Ophiuchus
5 Replies

3. Shell Programming and Scripting

Comparison of two files

Hi all I have two files which I have to compare that whetehr there is soemthing common or not body, div, table, thead, tbody, tfoot, tr, th, td, p { font-family: "Liberation Sans"; font-size: x-small; } body, div, table, thead, tbody, tfoot,... (2 Replies)
Discussion started by: manigrover
2 Replies

4. Shell Programming and Scripting

Binary files

Hi All,Is there anyway I can conver the binary file to ascii. I don't know the binary file format. file command just lists this as "data" file and when I view it has a lot of non-printable characters.Can I write any command equivalent to wc -l to find out the number of rows in the file?Can I use... (4 Replies)
Discussion started by: rahulkav
4 Replies

5. Shell Programming and Scripting

Comparison of two files (sh)

Hi, I have a problem with comparison of two files file1 20100101 20090101 20080101 20071001 20121229 file2 19990112 12 456 7 20011131 19 20100101 2 567 1 987 17890709 123 555 and, sh script needs to compare of these two files and give out to me result: 20100101 2 567 1 987 it... (5 Replies)
Discussion started by: shizik
5 Replies

6. Shell Programming and Scripting

comparison of 2 files

Kindly help on follows. I have 2 files. One file contains only one column of mobile numbers. And total records in a file 12 million. Second file contains 2 columns mobile numbers and balance. and total records 30 million. I want to find out balance of each data in file 1 corresponding to file 2.... (2 Replies)
Discussion started by: kamal_418
2 Replies

7. Shell Programming and Scripting

search for files excluding binary files

Hi All, I need a solution on my following find command find ./.. -name '*.file' -print BTW This gives me the output as belows ./rtlsim/test/ADCONV0/infile/ad0_dagctst.file ./rtlsim/test/ADCONV0/user_command.file ./rtlsim/test/ADCONV0/simv.daidir/scsim.db.dir/scsim.db.file... (2 Replies)
Discussion started by: user_prady
2 Replies

8. UNIX for Dummies Questions & Answers

Binary Files

Here's the problem... I'm using a simulator on UNIX, and it requires a filename where bits are stored, it should read them out and do whatever with them at that point.. So what i'm trying to do is make a binary file on UNIX. On my PC i can use MSDEV, or any of my C++ compilers to generate a... (2 Replies)
Discussion started by: wcRandThor
2 Replies

9. Shell Programming and Scripting

Binary Comparison

Hi guys, I need to write a script that will list all the files in the current diretory which are identical to a filename that the user enters using binary comparison, but I'm not entirely sure how to go about it. It's part of a larger script of system administration tools but I just can't find... (3 Replies)
Discussion started by: indigoecho
3 Replies

10. UNIX for Dummies Questions & Answers

Binary Files

Does any one know how to view a binary file as it is (in 1s and 0s) on unix environment? (1 Reply)
Discussion started by: devildivine
1 Replies
Login or Register to Ask a Question