linux what type of file

Post Reply
mister_v
Posts: 137
Joined: Sat Jun 20, 2009 5:42 pm

linux what type of file

Post 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 ?
Chris
Site Admin
Posts: 127
Joined: Mon Jul 21, 2008 9:45 am
Location: Leuven, Belgium
Contact:

Re: linux what type of file

Post 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
Post Reply