# 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

$file sample.txt sample.txt: ASCII text ## a python file $ file main.py
main.py: Python script text executable, ASCII text