Page 1 of 1

linux what type of file

Posted: Thu Sep 05, 2019 7:57 pm
by mister_v
Hi,

I have a file, but I do not what type it is.
A pdf, jpg or another file ?

Is there a way to find out ?

Re: linux what type of file

Posted: Thu Sep 05, 2019 8:08 pm
by Chris
You can use

Code: Select all

ls -lha filename
It shows the info about the file,

But perhaps what you are looking for is

Code: Select all

file filename
Result:

Code: Select all

file can_w33.pdf 
can_w33.pdf: PDF document, version 1.4