Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have 2 Binary Files FileA and FileC

Its is such that FileC = FileA + FileB using the cat utility

How do I subtract FileA from FileC to get FileB ?

share|improve this question
    
You use cat for binary files? –  user unknown Jan 14 '12 at 16:54
    
I use cat instead of using HJsplit or software like that . –  mataug Jan 14 '12 at 16:58

1 Answer 1

up vote 3 down vote accepted

Possible using the dd utility:

dd if=FileC of=FileB bs=1 skip=$(stat -c %s FileA)

See man dd for details.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.