Back to the learning path

file

file: determine file type Command details
Step 1/1: Identify a file

Linux does not go by extensions. file reads the start of a file and tells you whether it is text, a script, JSON, an archive or a program.

$ file photo.jpg notes.txt
Beginnerfile
What kind of file is it?
Do not trust the extension: use file to find out what kind of file index.html is.
locateNext lesson:stat