Para o primeiro nível de informação no arquivo de comando você pode usar file
.
$ file gtu.pdf
gtu.pdf: PDF document, version 1.4
Para a maioria dos formatos e informações mais detalhadas, você também pode usar Exiftool :
NAME
exiftool - Read and write meta information in files
SYNOPSIS
exiftool [OPTIONS] [-TAG...] [--TAG...] FILE...
exiftool [OPTIONS] -TAG[+-<]=[VALUE]... FILE...
exiftool [OPTIONS] -tagsFromFile SRCFILE [-SRCTAG[>DSTTAG]...] FILE...
exiftool [ -ver | -list[w|f|r|wf|g[NUM]|d|x] ]
For specific examples, see the EXAMPLES sections below.
This documentation is displayed if exiftool is run without an input FILE when one is expected.
DESCRIPTION
A command-line interface to Image::ExifTool, used for reading and writing meta information in a variety of
file types. FILE is one or more source file names, directory names, or "-" for the standard input.
Information is read from source files and printed in readable form to the console (or written to output text
files with -w).
Exemplo:
$ exiftool IMG_20151104_102543.jpg
ExifTool Version Number : 9.46
File Name : IMG_20151104_102543.jpg
Directory : .
File Size : 2.8 MB
File Modification Date/Time : 2015:11:04 10:25:44+05:30
File Access Date/Time : 2015:11:17 18:56:49+05:30
File Inode Change Date/Time : 2015:11:11 14:55:43+05:30
File Permissions : rwxrwxrwx
File Type : JPEG
MIME Type : image/jpeg
Exif Byte Order : Big-endian (Motorola, MM)
GPS Img Direction : 0
GPS Date Stamp : 2015:11:04
GPS Img Direction Ref : Magnetic North
GPS Time Stamp : 04:55:43
Camera Model Name : Micromax A121
Aperture Value : 2.1
Interoperability Index : R98 - DCF basic file (sRGB)
Interoperability Version : 0100
Create Date : 2002:12:08 12:00:00
Shutter Speed Value : 1/808
Color Space : sRGB
Date/Time Original : 2015:11:04 10:25:44
Flashpix Version : 0100
Exif Image Height : 2400
Exif Version : 0220
Exif Image Width : 3200
Focal Length : 3.5 mm
Flash : Auto, Did not fire
Exposure Time : 1/809
ISO : 100
Components Configuration : Y, Cb, Cr, -
Y Cb Cr Positioning : Centered
Y Resolution : 72
Resolution Unit : inches
X Resolution : 72
Make : Micromax
Compression : JPEG (old-style)
Thumbnail Offset : 640
Thumbnail Length : 12029
Image Width : 3200
Image Height : 2400
Encoding Process : Baseline DCT, Huffman coding
Bits Per Sample : 8
Color Components : 3
Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2)
Aperture : 2.1
GPS Date/Time : 2015:11:04 04:55:43Z
Image Size : 3200x2400
Shutter Speed : 1/809
Thumbnail Image : (Binary data 12029 bytes, use -b option to extract)
Focal Length : 3.5 mm
Light Value : 11.9
Existem também comandos específicos para alguns tipos de arquivos, como pdf :
$ pdfinfo gtu.pdf
Title: Microsoft Word - Thermax Ltd
Author: User
Creator: PScript5.dll Version 5.2.2
Producer: GPL Ghostscript 8.15
CreationDate: Tue Jan 27 11:51:38 2015
ModDate: Tue Jan 27 12:30:40 2015
Tagged: no
Form: none
Pages: 1
Encrypted: no
Page size: 612 x 792 pts (letter)
Page rot: 0
File size: 64209 bytes
Optimized: yes
PDF version: 1.4