*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> file (1)              


file(1)								       file(1)

NAME    [Toc]    [Back]

     file - determine file type

SYNOPSIS    [Toc]    [Back]

     file [-h] [-m mfile] [-f ffile] arg . . .
     file [-h] [-m mfile] -f ffile
     file -c [-m mfile]

DESCRIPTION    [Toc]    [Back]

     file performs a series of tests on	each file supplied by arg and,
     optionally, on each file supplied in ffile	in an attempt to classify it.
     If	arg appears to be a text file, file examines the first 512 bytes and
     tries to guess its	programming language.  If arg is an executable a.out,
     file prints the version stamp, provided it	is greater than	0.  For	COFF
     executables, the version stamp will give the version of compilers used to
     generate the executable.  For ELF executables, the	version	stamp gives
     the version of ELF	to which the file conforms.  If	arg is a symbolic
     link, by default the link is followed and file tests the file that	the
     symbolic link references.

     -c		 Check the magic file for format errors.  For reasons of
		 efficiency, this validation is	normally not carried out.

     -f	ffile	 ffile contains	the names of the files to be examined.

     -h		 Do not	follow symbolic	links.

     -m	mfile	 Use mfile as an alternate magic file, instead of /etc/magic.

     file uses /etc/magic to identify files that have a	magic number.  A magic
     number is a numeric or string constant that indicates the file type.
     Commentary	at the beginning of /etc/magic explains	its format.

     file classifies files containing supplementary code set characters
     according to the locale specified in the LC_CTYPE environment variable
     [see LANG on environ(5)].	file reads each	argument and can distinguish
     data files, program text files, shell scripts, and	executable files as

		   Files			  Classification
		   Data	files containing	  data
		   supplementary characters

		   Shell scripts containing	  command text
		   supplementary characters
		   Language program text files	  xxx text
		   containing literals or
		   comments using supplementary

									Page 1

file(1)								       file(1)

		   Executable files		  executable

FILES    [Toc]    [Back]

	  language-specific message file [See LANG on environ(5).]

SEE ALSO    [Toc]    [Back]


DIAGNOSTICS    [Toc]    [Back]

     If	the -h option is specified and arg is a	symbolic link, file prints the
     error message:
	  UX:file:ERROR:symbolic link to arg

									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
fstyp HP-UX determine file system type
isdialuptty FreeBSD determine tty type from ttys file entry
isfdtype OpenBSD determine whether a file descriptor is of a specific type
isnettty FreeBSD determine tty type from ttys file entry
DtDtsDataTypeIsAction HP-UX determine if the data type is an action
isnan IRIX determine type of floating-point number
rqsread IRIX reads the information out of an ELF file that is needed to determine if the file needs to be requickstarted
isastream Tru64 Determine if a file descriptor refers to a STREAMS file
access HP-UX determine accessibility of a file
access IRIX determine accessibility of a file
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service