file man page on OpenIndiana

Man page or keyword search:  
man Server   20441 pages
apropos Keyword Search (all sections)
Output format
OpenIndiana logo
[printable version]

file(1B)	   SunOS/BSD Compatibility Package Commands	      file(1B)

NAME
       file - determine the type of a file by examining its contents

SYNOPSIS
       /usr/ucb/file [-f ffile] [-cL] [-m mfile] filename...

DESCRIPTION
       file  performs  a  series  of  tests on each  filename in an attempt to
       determine what it contains. If the contents of  a  file	appear	to  be
       ASCII  text,  file  examines the first 512 bytes and tries to guess its
       language.

       file uses the file /etc/magic to identify files that have some sort  of
       magic number, that is, any file containing a numeric or string constant
       that indicates its type.

OPTIONS
       -c	   Check for format errors in the magic number file. For  rea‐
		   sons of efficiency, this validation is not normally carried
		   out. No file type-checking is done under -c.

       -f ffile	   Get a list of filenames to identify from  ffile.

       -L	   If a file is a symbolic link, test the file the link refer‐
		   ences rather than the link itself.

       -m mfile	   Use mfile as the name of an alternate magic number file.

EXAMPLES
       Example 1 Using file on all the files in a specific user's directory.

       This example illustrates the use of file on all the files in a specific
       user's directory:

	 example% pwd
	 /usr/blort/misc

	 example% /usr/ucb/file	 *

	 code:		 mc68020 demand paged executable
	 code.c:	 c program text
	 counts:	 ascii text
	 doc:		 roff,nroff, or eqn input text
	 empty.file:	 empty
	 libz:		 archive random library
	 memos:		 directory
	 project:	 symboliclink to /usr/project
	 script:	 executable shell script
	 titles:	 ascii text
	 s5.stuff:	 cpio archive

	 example%

ENVIRONMENT VARIABLES
       The environment variables LC_CTYPE, LANG, and  LC_default  control  the
       character classification throughout file. On entry to file, these envi‐
       ronment variables are checked in the following order:  LC_CTYPE,	 LANG,
       and  LC_default.	 When  a  valid	 value is found, remaining environment
       variables for character classification are ignored. For example, a  new
       setting	for LANG does not override the current valid character classi‐
       fication rules of LC_CTYPE. When none of the values is valid, the shell
       character classification defaults to the	  POSIX.1 "C"  locale.

FILES
       /etc/magic

ATTRIBUTES
       See attributes(5) for descriptions of the following attributes:

       ┌─────────────────────────────┬─────────────────────────────┐
       │      ATTRIBUTE TYPE	     │	    ATTRIBUTE VALUE	   │
       ├─────────────────────────────┼─────────────────────────────┤
       │Availability		     │compatibility/ucb		   │
       └─────────────────────────────┴─────────────────────────────┘

SEE ALSO
       magic(4), attributes(5)

BUGS
       file  often makes mistakes.  In particular, it often suggests that com‐
       mand files are C programs.

       file does not recognize Pascal or  LISP.

SunOS 5.11			  14 Sep 1992			      file(1B)
[top]

List of man pages available for OpenIndiana

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net