Linux / UNIX: Determine File Type

How do I determine the file type under UNIX or Linux like operating systems? You need to use the file command to determine file type. File command tests each argument in an attempt to classify it. There are three sets of tests, performed in this order: filesystem tests, magic number tests, and language tests. The …