The file command is a very useful utility to get information about the filetype. For example, file sample.mp4 may print the following information:

sample.mp4: ISO Media, MPEG v4 system, version 1

Oftentimes, the version of a particular document (e.g., PDF version, rpm version, etc.) will also be shown. file -s /dev/sdaX (where X is the partition number) can even be used to print out information about partitions, an example for an XFS filesystem shown below:

/dev/sda7: SGI XFS filesystem data (blksz 4096, inosz 256, v2 dirs)