Checking file type with file

To determine the file type of an existing file, we can use the file command to return file specifications. Below is an example of text and python file

A sample text file

$ file sample.txt
sample.txt: ASCII text

a python file

$ file Python script text executable, ASCII text