file [options] file...Arguments explained
- file is one or more paths to identify.
- -b omits the filename in output.
- -i prints MIME-style information.
Common examples
file archiveReports whether archive is text, compressed data, an executable, an image, or another type.
file -i image.pngPrints MIME information useful for scripts.
| Field | Details |
|---|---|
| Command | file |
| Category | File and Folder Operations |
| Primary use | Identifies a file's type from its contents. |
| Syntax | file [options] file... |