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 appRelated terms
- static binary — A program file that carries all the code it needs inside it and loads no shared libraries from the machine it runs on.
- binary — A compiled program file that a computer runs directly, as opposed to the source code it was built from.
- CPU architecture — The family of instructions a processor understands, such as 64-bit Intel (amd64) or 64-bit Arm (arm64).
Taught in
- Building Static Binaries — Concurrent Systems Programming with Go