aboutsummaryrefslogtreecommitdiff
path: root/magic/MAGIC.txt
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2025-11-19 16:27:16 -0500
committerB. Watson <urchlay@slackware.uk>2025-11-19 16:27:16 -0500
commit6259ba06fcf9574eae28c9c3222e14605c2cf27b (patch)
tree191ec1ed3340ac18b8732d02035acaf4ded692e7 /magic/MAGIC.txt
parent82c7a4d367f5f7ba42d31acfdcf66b787c0bdb78 (diff)
downloadunalf-6259ba06fcf9574eae28c9c3222e14605c2cf27b.tar.gz
Add file(1) magic.
Diffstat (limited to 'magic/MAGIC.txt')
-rw-r--r--magic/MAGIC.txt45
1 files changed, 45 insertions, 0 deletions
diff --git a/magic/MAGIC.txt b/magic/MAGIC.txt
new file mode 100644
index 0000000..9e04bb1
--- /dev/null
+++ b/magic/MAGIC.txt
@@ -0,0 +1,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.