Linux
Check File Type

Finding a File's Extention

Determine the file type of a website URL with the following command:

curl -s https://placehold.co/600x400/EEE/31343C | file -

Expected Output:

# /dev/stdin: SVG Scalable Vector Graphics image

Locate the file extension of a local file using the following command:

file /path/to/file/Example.zip