BlogBlog ÜbersichtjailscriptportsoptFreeBSDLinksThermoskanne

Dateityp bestimmen

Hat man eine Datei von welcher man allerdings nicht weiss, von welchem Dateityp sie ist, so hilft einem file(1) weiter.

# file testbild 
testbild: PNG image data, 1398 x 1019, 8-bit/color RGB, non-interlaced

Es lässt sich auch der Typ von mehreren Dateien gleichzeitig bestimmen:

# file powerd.patch FreeSBIE.iso me.asc pf.pdf
powerd.patch: 'diff' output text
FreeSBIE.iso: ISO 9660 CD-ROM filesystem data 'FreeSBIE' (bootable)
plan9.iso.gz: gzip compressed data, was "plan9.iso", from Unix
me.asc: PGP armored data public key block
pf.pdf: PDF document, version 1.4

Mit file können auch Wildcards benutzt werden:

# file /home/beat*
/home/beat/FreeBSD.pdf: PDF document, version 1.4
/home/beat/FreeBSD.pps: Microsoft Office Document
/home/beat/MVI_2885.AVI: RIFF (little-endian) data, AVI, 640 x 480, 30.00 fps, video: Motion JPEG, audio: uncompressed PCM (mono, 11024 Hz)
/home/beat/tinderbox: ASCII text
/home/beat/shtest: Bourne shell script text executable
/home/beat/bsdtalk052.mp3: MP3 file with ID3 version 2.3.0 tag

Mehr Informationen zu file findet man in der Mapage file(1).

 Permalink

Comments

No new comments allowed (anymore) on this post.