winfile 1.0.0
A port of the Unix file command for Windows and Linux. It identifies what a
file is by looking inside it — magic-byte signatures, structural markers, and
encoding heuristics — rather than trusting the extension, which is a convention a
file may or may not honour. Output follows GNU file, so it drops into existing
scripts and pipelines unchanged.
Windows ships nothing equivalent.
Binaries
| Asset | Platform |
|---|---|
winfile_windows_amd64.exe |
Windows, x86-64 |
winfile_windows_arm64.exe |
Windows, ARM64 |
winfile_linux_amd64 |
Linux, x86-64 |
winfile_linux_arm64 |
Linux, ARM64 |
Each is self-contained: put one on your PATH and run it, nothing to extract or
install. On Linux, chmod +x it first.
The binary takes its name from argv[0], so renaming it renames the tool in its
own messages — copy it as winfile.exe, or as file if you would rather it
answered to that.
What it detects
Images, audio and video containers, archives (ZIP, gzip, bzip2, XZ, zstd, LZ4,
7-Zip, RAR, tar, cab, ar), OOXML documents and other ZIP-based containers such as
EPUB, JAR and APK, executables and object files for several platforms, databases,
fonts, and a text pass that reports the encoding — ASCII, UTF-8, UTF-16 with
either byte order, and Latin-1 — along with the line endings.
Verified against the original
Checked against GNU file on Linux, which agrees on PDFs, ASCII text and the
other everyday cases. One known gap: for ELF binaries winfile reports the
broad class — ELF 64-bit LSB shared object — where GNU file goes on to name
the architecture, interpreter, build ID and stripped state.