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
A fast way to do this in ubuntu is use nautilus in the "list" view. The type column will show you if its text or binary
The diff manual specifies that
diff determines whether a file is text or binary by checking the first few bytes in the file; the exact number of bytes is system dependent, but it is typically several thousand. If every byte in that part of the file is non-null, diff considers the file to be text; otherwise it considers the file to be binary.