binary compare two files, failing only if first never matches any part of the second
I have a file (call it _A_ , for reference) that may be a fragment of some other extant file on my system. I can't use `cmp` because I don't know how many bytes may be missing from the start of _A_ (or, at least, I can't use it without brute forcing through the -i flag). Is there a way for me to discover whether _A_ is already existent on my system (using GNU tools, or any other linux program)? Or will I have to botch together a c++ program to do the job? Note: efficiency is desirable since the files that _A_ has to be compared with may be numerous.
Not knowing how big the chunk ( _A_ ) is ... have you considered grep'ing for its content using **-a**?