There is a way to find file type, and related metadata to the file from command line.
Meta data includes some details like Operating system, file type, Created time, Last saved time etc.. and many others depending on file type.
The command you need to use to get file type is file.
$ file Linux_shell_scripting_v2.pdf
Output: Linux_shell_scripting_v2.pdf: PDF document, version 1.3
$ file t.sh
Output: t.sh: ASCII text, with very long lines