Examples of using the file command

To check the identity of a single file:

   file ReportA
   ReportA:        Frame Maker document

This checks the identity of the file ReportA and reports that this file has been created using the Frame Maker application.


To check the identity of several files:

   file *
   external.c:     c program text
   external.h:     c program text
   mc:             sparc demand paged dynamically linked executable
   mcXThelp:       executable shell script
   mcdemo:         executable shell script
   mchelp:         executable shell script
   mchome:         executable shell script
   mctools:        executable shell script

This checks the identity of every file in the current directory. Notice how it reports whether a file is an executable binary or a shell script.


[Home] [Search] [Index] This site maintained by webmaster@cs.auckland.ac.nz