The linux file command does a very good job in recognising file types and gives very fine-grained results. The diff tool is able to tell binary files f
file
diff
You could try to give a
strings yourfile
command and compare the size of the results with the file size ... i'm not totally sure, but if they are the same the file is really a text file.