Description
Identifies file types by inspecting file contents and metadata instead of relying only on file names. Users and scripts use it to understand unknown files, troubleshoot downloads, or choose the right program to open data.
Run the file command from a terminal and pass one or more paths. It reads file data for detection, so be careful when inspecting sensitive files in shared command histories or logs.