Examples of using the file command

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 unixhelp@math.rutgers.edu
This page was last updated on September 05, 2006 at 10:30 am and is maintained by webmaster@math.rutgers.edu.
For questions regarding courses and/or special permission, please contact mclausen@math.rutgers.edu.
For questions or comments about this site, please contact help@math.rutgers.edu.
© 2012 Rutgers, The State University of New Jersey. All rights reserved.