>_
linuxcommand.dev
Home
Roadmap
Contact
EN
Dark
>_
>_
linuxcommand.dev
Home
Roadmap
Contact
Legal Notice
Privacy Policy
Language
DE
EN
Design
Dark
Startseite
›
file
Filesystem
file
Detects file type based on contents.
Ubuntu
CentOS
Debian
Arch
SUSE
Slackware
Alpine
Fedora
Last updated:
2026-07-05
Report error
Syntax
Copy
$
file [OPTIONS] FILE
Examples
Examples
$
file image.png
Examples
$
file -i file.txt
Typical use cases
Show type
file image.png
MIME type
file -i file.txt
Note
Magic number detection.
Export
Text
JSON
Script