Feature request #4407

Provide an entry for the magic(5) file

Added by Sandro Santilli about 6 years ago. Updated 6 months ago.

Pull Request or Patch supplied:No Resolution:
Easy fix?:No


The magic file, usually /etc/magic for local entries on a debian-based system, is the file used to tell what kind of data is contained in a file by taking a look inside.
This is what makes this kind of responses possible from the file(1) command:

$ file snow.swf asus.swf
snow.swf: Macromedia Flash data, version 5
asus.swf: Macromedia Flash data (compressed), version 8

Note the level of detail. The command distinguished between a version 5 and a version 8, and also between an uncompressed and a compressed kind of the SWF binary format.
With text format it should be much easier, but this is what you get querying a qgis project file:

$ file myproject.qgs
myproject.qgs: exported SGML document text

Not that helpful ...

Adding the following line to /etc/magic makes it a_little_bit better:

0 search/1000/cb \\<!DOCTYPE\\ qgis QuantumGIS configuration file

But I'd love to see something more detailed.

In any case it doesn't look like there's one of those standardized ways to install such entries (ala /etc/magic.d/*) so not sure how would such entries addition be automatized on "make install".
Still, providing a file for manual installation might be handy for the time being and inspirational for whoever wants to improve it for final submission to whatever package mantains the magic file.

For the record, the official maintainer for that file is the libmagic1 package maintainer.


#1 Updated by Giovanni Manghi almost 6 years ago

  • Target version set to Version 1.7.4

#2 Updated by Giovanni Manghi over 5 years ago

  • Target version changed from Version 1.7.4 to Version 2.0.0

#3 Updated by Pirmin Kalberer about 5 years ago

  • Target version changed from Version 2.0.0 to Future Release - Nice to have

#4 Updated by Giovanni Manghi 6 months ago

  • Easy fix? set to No

Also available in: Atom PDF