file (command)

A Unix command that inspects a file's contents and reports what kind of file it is, such as a statically linked executable for a given processor.

In more detail

It reads the start of a file rather than trusting its name, so it reports what the file really is. Running it after a build confirms the target operating system, processor family and whether a program is statically linked.

Example

file app

Related terms

Taught in

References