Problem: Get the file type in shell/terminal (unix) independent of the file extension
Answer: Use linux command file to get the file type from file header. Eg, if you have a image file without extension, file myfilename will give you the header info:
eg:
|
1 |
file myfile |
myfilename: JPEG image data, JFIF standard 1.01
