file
noun
say it: “FYL” /faɪl/
A command that looks inside a file and reports what kind of data it holds, such as plain text, a picture or a program.
What does the file command do?
file looks inside a file and says what kind it is: plain text, a picture, a program. It goes by what's inside, not by the name, so it's a safe check before you open a file with cat.
file README.md
# README.md: ASCII text
In a sentence
- “Before opening the mystery download, Leo ran file on it and learned it was a picture, not text.”
- “The file command said README.md was ASCII text, so cat was safe to use.”
Level: Apprentice · More Unix terms at this level
Updated