aboutsummaryrefslogtreecommitdiff
path: root/magic/MAGIC.txt
blob: 9e04bb18db7d587a8905b7f5e5e4d1d641b53a8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
This directory contains "magic" for the file(1) command. It doesn't
get installed by 'make install' because every OS seems to handle file
magic differently.

At some point, the ALF magic will be added to file(1). Try this:

  file examples/aprog.alf

If the result looks like this:

  examples/aprog.alf: Atari 8-bit AlfCrunch data, first filename APROG10.001

...then your file command already knows about ALF files, and you can stop
reading now.

If you get something similar to this:

  examples/aprog.alf: data

...then you can add ALF support by copying the file magic/alf to your
magic directory (usually this is /etc/file/magic) and recompiling the
magic database (this is done differently on different OSes).

For Slackware Linux, the commands would be:

  cp magic/alf /etc/file/magic
  /etc/file/recompile_magic.mgc.sh

On other OSes that have a /etc/file/magic directory, You could also
try replacing the 2nd command with:

  cd /etc/file
  file --compile

The above commands must be run as root. You can prefix them with
"sudo" if your user is set up for sudo access.

After recompiling the file magic database, the file command will
identify ALF archives correctly, as in the first example above.

If you're creating a distro package of unalf, install magic/alf
to wherever your OS keeps its magic files, and recompile the magic
database in your package system's post-install hook. If there's
also a post-uninstall hook, you probably should recompile the magic
again there.