How to tell binary from text files in linux

后端 未结 8 1028
[愿得一人]
[愿得一人] 2021-02-07 13:52

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

相关标签:
8条回答
  • 2021-02-07 14:48

    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

    0 讨论(0)
  • 2021-02-07 14:52

    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.

    0 讨论(0)
提交回复
热议问题