Determine file type.

Synopsis

file [OPTION]... FILE...

Description

Examines each FILE and prints a description of its type, based on content inspection.

Options

-b, --brief Do not prepend filenames to output.

-i, --mime Output MIME type strings.

-L, --dereference Follow symlinks.

--help Display help and exit.

Examples

$ file photo.jpg

Print the detected type of photo.jpg.

$ file -i *.pdf

Print MIME types for all PDFs in the directory.

Notes

Runs against the SLICC virtual filesystem; detection is based on file content/magic bytes, similar to GNU file.

See Also

stat, ls