Skip to main content
The 2024 Developer Survey results are live! See the results

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • 1
    It generates output like: Accounts.java: Java source, ASCII text\012- on Windows in MinTTY Commented Feb 13, 2020 at 19:39
  • @standalone: interesting. I've read weird things about an option called "igncr" -- and what you're saying sounds like that. But can't reproduce what you describe. (I tried inside the Bash inside mintty that comes with Git-for-Windows, "git version 2.24.0.windows.1".) Commented Feb 14, 2020 at 9:09
  • Hm, I tried file -k Accounts.java inside the mintty that comes with git-for-windows too, but my version is git version 2.21.0.windows.1 Commented Feb 14, 2020 at 15:20
  • Working solution for me is cat -e file_to_test Commented Feb 14, 2020 at 15:21
  • Thank you for file -k, that's exactly what I've been looking for. The help description of "don't stop at the first match" didn't click for me, but makes sense. Commented Feb 15 at 15:53