Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Jan 182010

How to determine the type of a file in Linux


The file command is what you need, e.g.

# file /bin/gzip

/bin/gzip: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), 
dynamically linked (uses shared libs), for GNU/Linux 2.6.15

# file /usr/share/doc/apt/changelog.gz

/usr/share/doc/apt/changelog.gz: gzip compressed data, from Unix, 
max compression

 Leave a Reply



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>