Determine File Types from the Terminal

We may earn a commission from links on this page.



Mac/Linux users: You can use the file filename terminal command to quickly identify file information. Occasionally you will come across files that have an incorrect or missing file extension. As shown above, the file command analyzes the file given as an argument and displays details about the file. This command is especially useful when it comes to managing large libraries of music, images and video. If you're scared of the terminal foo, you can obtain file extension information from the web, too. Any Windows users know the equivalent Command Prompt syntax? Share in the comments.

Determine File Type [A Linux Sysad Blog]