file — Determine File Type

Synopsis

/usr/bin/file [-h][-m mfile][-f ffile] file 
/usr/bin/file [-h][-m mfile] -f ffile 
/usr/bin/file -c [-m mfile] 

Description

The file command performs a series of tests on each file supplied by file and, optionally, on each file listed in ffile in an attempt to classify it. If the file is not a regular file, its file type is identified. The file types directory, FIFO, block special, and character special are identified as such. If the file is a regular file and the file is 0-length, it is identified as an empty file.

If file is a text file, file examines the first 512 bytes and tries to determine its programming language. If file is an executable a.out, file prints the version stamp, provided it is greater ...

Get Solaris™ 7 Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.