FILE(1) — USER COMMANDS
NAME
file − determine file type
SYNOPSIS
file [ −f ] file ...
DESCRIPTION
File performs a series of tests on each file in an attempt to determine what its contents are. If an argument appears to be ASCII, file examines the first 512 bytes and tries to guess its language.
OPTIONS
−f If the −f flag is used, file assumes that the filename given next on the command line is a file containing a list of files, and operates on each file listed.
EXAMPLE
The example illustrates the use of file on all the files in a specific user’s directory:
% pwd
/usr/henry/misc
% ls
bensusanfortran.mssmessagesromerotoolkit.tr
command.listjokespascal.msssquashuseful.news
countslettersplay.msstech.papersv7.stuff
deutermemosroadmap.msstitleswindow
% file ∗
bensusan:roff, nroff, or eqn input text
command.list:roff, nroff, or eqn input text
counts:ascii text
deuter:roff, nroff, or eqn input text
fortran.mss:roff, nroff, or eqn input text
jokes:directory
letters:directory
memos:directory
messages:directory
pascal.mss:roff, nroff, or eqn input text
play.mss:roff, nroff, or eqn input text
roadmap.mss:roff, nroff, or eqn input text
romero:roff, nroff, or eqn input text
squash:directory
tech.papers:directory
titles:ascii text
toolkit.tr:roff, nroff, or eqn input text
useful.news:directory
v7.stuff:archive
window:directory
%
BUGS
file often makes mistakes. In particular, it often suggests that command files are C programs.
Does not recognize Pascal or LISP.
Sun Release 3.0β — Last change: 13 November 1984