check the file type

September 23rd, 2006 mysurface Posted in backquote, Common, file, which | Hits: 43292 | 3 Comments »

A command file is a good tool to help you determine what file type of a file. To check for a file type simply do this

file filename

Let say i want to check the file type of command line update-rc.d, i can do this

file `which update-rc.d`


/usr/sbin/update-rc.d: perl script text executable

Uses which to returns the full path of the filename and back quote is to return result to command file.

3 Responses to “check the file type”

  1. […] To check out the type of a file, you can use file, Check the file type […]

  2. Informative..

  3. richaar88 wordpress com

Leave a Reply