pkg.soopen package index

brew / rank 2043

Install file-formula with Homebrew, apk, chocolatey, apt, dnf, MacPorts, Nix, pacman, zypper, scoop, winget

Utility to determine file types. Version 5.48 via Homebrew; verified 2026-06-22. Also installable with macports: sudo port install file.

install

Additional install commands

macOS

Homebrewverified · 100%
brew install file-formula

local Homebrew formula metadata

MacPortsverified · 94%
sudo port install file

MacPorts ports tree · sysutils/file/Portfile · source: api.github.com

Linux

Alpine Linux apkverified · 92%
sudo apk add file

Alpine Linux edge package indexes · file · source: dl-cdn.alpinelinux.org

Debian aptverified · 92%
sudo apt install file

Debian stable package indexes · file · source: deb.debian.org

Fedora dnfverified · 92%
sudo dnf install file

Fedora Rawhide package metadata · file · source: dl.fedoraproject.org

Nixverified · 92%
nix profile install nixpkgs#file

nixpkgs package indexes · file · source: raw.githubusercontent.com

Arch Linux pacmanverified · 92%
sudo pacman -S file

Arch Linux sync databases · file · source: geo.mirror.pkgbuild.com

openSUSE zypperverified · 92%
sudo zypper install file

openSUSE Tumbleweed package metadata · file · source: download.opensuse.org

Windows

Chocolateyverified · 92%
choco install file

Chocolatey community package catalog · file · source: community.chocolatey.org

Scoopverified · 92%
scoop install main/file

Scoop official bucket manifest trees · bucket/file.json · source: api.github.com

Windows Package Managerverified · 92%
winget install --id GnuWin32.File -e

Windows Package Manager source index · GnuWin32.File · source: cdn.winget.microsoft.com

overview

Package summary

Utility to determine file types

Commands and aliases

  • file

history

Project history and usage

file is the widely used Unix command and libmagic library for identifying file types from contents rather than names or extensions.

Project history

Ian Darwin's official page distinguishes the historical Bell Labs Unix file command from his free reimplementation. It notes that the original command shipped with Bell Labs Unix, including a Research 4th Edition man page from 1973, but was not generally available in source form before Darwin's reimplementation.

Darwin's implementation and magic file began in 1987; the page shows an RCS initial revision dated August 23, 1987. The README describes Release 5.x as Ian Darwin's implementation of the Unix file command and says it knows the magic numbers of several thousand file types.

Maintenance later broadened. The README credits Guy Harris as the prime contributor to Release 3.8, Christos Zoulas as the prime contributor to Release 3.0, and Mans Rullgard as the prime contributor to 4.0, where the code was refactored into libmagic and the file command was rewritten on top of that library.

Adoption history

The official README states that this version is the standard file command for Linux, BSD, and other systems. Darwin's page adds that it ships with most free operating systems, has been ported to systems including DOS, Microsoft Windows, and OS/2, and that OpenBSD uses the project's configuration files even though it maintains its own code.

The supplied package metadata reflects that platform reach, listing packages across Homebrew, Alpine, Debian, Ubuntu, Fedora, MacPorts, Nix, Arch, Scoop, Chocolatey, winget, and openSUSE.

How it is used

The command-line use is simple: pass paths to file and receive textual guesses about their data type. The important behavior is that it examines file contents, including filesystem data, magic rules, and hardwired text/encoding checks, rather than relying on filename extensions.

The libmagic split made the same detection engine reusable by other programs without spawning the file command. The README and homepage call out libmagic as a library interface for third-party file-type detection.

Why package nerds care

file is one of the core Unix plumbing commands package maintainers take for granted until it is missing, stale, or misdetecting a format. It underpins configure scripts, build systems, MIME/type detection, archive inspection, and debugging sessions.

Its magic database is also culturally important: maintaining file means maintaining a compact, portable folk taxonomy of binary formats, text encodings, archives, executable formats, and application data.

Timeline

  • 1973: A Research 4th Edition Unix file man page documents the earlier Bell Labs command.
  • 1987: Ian Darwin's RCS history records the initial revision of his free implementation.
  • Release 3.0: Christos Zoulas contributes major code changes.
  • Release 3.8: Guy Harris contributes byte-order independence and other large changes.
  • Release 4.0: The code is refactored into libmagic plus a command-line frontend.
  • Release 5.x: The README identifies it as the standard file command for Linux, BSD, and other systems.

Related projects

  • file is related to libmagic consumers, MIME detection systems, Unix magic(5) databases, package build tooling, and operating-system file managers that need content-based type detection.

security posture

Risk level: green

narrow executable package without higher-risk signals.

Risk classifier

green risk · low confidence · appliance

Why

  • narrow executable package without higher-risk signals

Signals

  • metadata:no-higher-risk-signals

Install behavior

  • No Homebrew bottle metadata was recorded.

Recommended review

Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.

executables

Installed executables

CommandKindExposureNote
fileexecutableindexed executableDiscovered from the local executable index.

freshness

Version and freshness

These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.

page generated2026-08-03
manager version5.48
manager updated2026-06-22
local dataunknown
upstreamnot available
latest detectednot detected
  • okNo freshness warnings were generated.

install metadata

Package metadata

Package keybrew:file-formula
Version5.48
Package managerHomebrew
Homepagehttps://darwinsys.com/file/
Repositoryhttps://github.com/file/file
Last updated2026-06-22T14:03:20-07:00
Pulseupdated
Bottlenot recorded
Servicenone declared

source database matches

Other package-manager records

Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.

MacPorts94%

file

sudo port install file
  • installed executable or alias match
  • Matched by: File
MacPorts ports tree · api.github.com · MacPorts ports tree: sysutils/file/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
Debian apt92%

file 1:5.46-5

Recognize the type of data in a file using "magic" numbers

https://www.darwinsys.com/file/

sudo apt install file
  • Section: utils
  • Architecture: amd64
  • 2 dependencies
  • installed executable or alias match
  • Matched by: File
Debian stable package indexes · deb.debian.org · Debian stable package indexes: file from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Debian apt92%

libmagic-dev 1:5.46-5

Recognize the type of data in a file using "magic" numbers - development

https://www.darwinsys.com/file/

sudo apt install libmagic-dev
  • Section: libdevel
  • Architecture: amd64
  • Source Package: file
  • 1 dependencies
  • 1 optional deps
  • installed executable or alias match
  • Matched by: File
Debian stable package indexes · deb.debian.org · Debian stable package indexes: libmagic-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Debian apt92%

libmagic-mgc 1:5.46-5

File type determination library using "magic" numbers (compiled magic file)

https://www.darwinsys.com/file/

sudo apt install libmagic-mgc
  • Section: libs
  • Architecture: amd64
  • Source Package: file
  • installed executable or alias match
  • Matched by: File
Debian stable package indexes · deb.debian.org · Debian stable package indexes: libmagic-mgc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Debian apt92%

libmagic1t64 1:5.46-5

Recognize the type of data in a file using "magic" numbers - library

https://www.darwinsys.com/file/

sudo apt install libmagic1t64
  • Section: libs
  • Architecture: amd64
  • Source Package: file
  • 5 dependencies
  • 1 provides
  • 1 optional deps
  • installed executable or alias match
  • Matched by: File
Debian stable package indexes · deb.debian.org · Debian stable package indexes: libmagic1t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Nix92%

file

nix profile install nixpkgs#file
  • installed executable or alias match
  • Matched by: File
nixpkgs package indexes · raw.githubusercontent.com · nixpkgs package indexes: file from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
Ubuntu apt92%

file 1:5.45-3build1

Recognize the type of data in a file using "magic" numbers

https://www.darwinsys.com/file/

sudo apt install file
  • Section: utils
  • Architecture: amd64
  • 2 dependencies
  • installed executable or alias match
  • Matched by: File
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: file from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz
Ubuntu apt92%

libmagic-dev 1:5.45-3build1

Recognize the type of data in a file using "magic" numbers - development

https://www.darwinsys.com/file/

sudo apt install libmagic-dev
  • Section: libdevel
  • Architecture: amd64
  • Source Package: file
  • 1 dependencies
  • 1 optional deps
  • installed executable or alias match
  • Matched by: File
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: libmagic-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz
Ubuntu apt92%

libmagic-mgc 1:5.45-3build1

File type determination library using "magic" numbers (compiled magic file)

https://www.darwinsys.com/file/

sudo apt install libmagic-mgc
  • Section: libs
  • Architecture: amd64
  • Source Package: file
  • installed executable or alias match
  • Matched by: File
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: libmagic-mgc from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz
Ubuntu apt92%

libmagic1t64 1:5.45-3build1

Recognize the type of data in a file using "magic" numbers - library

https://www.darwinsys.com/file/

sudo apt install libmagic1t64
  • Section: libs
  • Architecture: amd64
  • Source Package: file
  • 5 dependencies
  • 1 provides
  • 1 optional deps
  • installed executable or alias match
  • Matched by: File
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: libmagic1t64 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz
apk92%

file 5.47-r2

File type identification utility

https://www.darwinsys.com/file/

sudo apk add file
  • License: BSD-2-Clause
  • Architecture: x86_64
  • Source Package: file
  • 1 dependencies
  • 1 provides
  • installed executable or alias match
  • Matched by: File
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: file from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
apk92%

file-dev 5.47-r2

File type identification utility (development files)

https://www.darwinsys.com/file/

sudo apk add file-dev
  • License: BSD-2-Clause
  • Architecture: x86_64
  • Source Package: file
  • 1 dependencies
  • 1 provides
  • installed executable or alias match
  • Matched by: File
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: file-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
apk92%

file-doc 5.47-r2

File type identification utility (documentation)

https://www.darwinsys.com/file/

sudo apk add file-doc
  • License: BSD-2-Clause
  • Architecture: x86_64
  • Source Package: file
  • installed executable or alias match
  • Matched by: File
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: file-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
apk92%

libmagic 5.47-r2

File type identification library

https://www.darwinsys.com/file/

sudo apk add libmagic
  • License: BSD-2-Clause
  • Architecture: x86_64
  • Source Package: file
  • 1 dependencies
  • 1 provides
  • installed executable or alias match
  • Matched by: File
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: libmagic from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
apk92%

libmagic-static 5.47-r2

File type identification utility (static library)

https://www.darwinsys.com/file/

sudo apk add libmagic-static
  • License: BSD-2-Clause
  • Architecture: x86_64
  • Source Package: file
  • installed executable or alias match
  • Matched by: File
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: libmagic-static from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
dnf92%

file 5.47-3.fc45

Utility for determining file types

https://www.darwinsys.com/file/

sudo dnf install file
  • License: BSD-2-Clause-Darwin AND BSD-2-Clause
  • Category: Unspecified
  • Architecture: x86_64
  • Source Package: file
  • 4 dependencies
  • 2 provides
  • installed executable or alias match
  • Matched by: File
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: file from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

source trail

Generated from repository data

This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.

Used sources

  • Geiger risk classifier
  • cross-ecosystem install command graph
  • curated package history
  • external package-manager database matches
  • pkg.so package database
  • pkgdb category and tag curation