magic_load: using default + extra magic files?

David Nachum david.nachum at berkeley.edu
Fri Aug 15 02:11:55 EEST 2008


At the moment, when using magic_load (libmagic(3)), if the file name used
as the second parameter is something other than NULL, then ONLY that file
is used (and not the default database file). This means that in order to
use one's own magic files in ADDITION to the default, one must retrieve
the location of the default magic file (as far as I can tell, the easiest
way to do this is the command "file -v") and add that to the
colon-separated list of files.

Is there an easier way to do this using the libmagic library?

Thanks.
-David



More information about the File mailing list