Linux Command - file

file - determine file type.

Syntax

1
file FILE...

Examples

Determine file type of a file

1
file file1

sample output for a text file

1
file1:       ASCII text, with very long lines

sample output for a pdf file

1
abc.pdf: PDF document, version 1.5

Determine file type of all files in the folder

1
file test/*

Reference