File Type Info With File

Use the file utility to determine the type of a file:

$ file todo.md
todo.md: ASCII English text

$ file Hello.java
Hello.java: ASCII C++ program text

$ file Hello.class
Hello.class: compiled Java class data, version 52.0

The Hello.java file isn't exactly a C++ program, but close enough.

Last updated