Artificial intelligent assistant

When trying to compile magic file : Warning: type `' invalid and Warning: offset `search' invalid I'm trying to compile a very basic magic file with the command: $ file -C -m foo I get this error: foo, 1: Warning: type `' invalid foo, 2: Warning: offset `search' invalid foo, 3: Warning: type `' invalid foo, 4: Warning: offset `Itis42file' invalid My file looks like this: 42 search 42 Itis42file I have followed the man magic and it doesn't work.

The format of the `magic` file is described in the `magic(5)` manual on your system (`man 5 magic`).

On an Ubuntu system I have access to (as well as on my OpenBSD system), the format is described as a collection of lines with the following fields:


offset type test message


I'm guessing that your file should therefore not contain four lines, but one:


42 search 42 Itis42file


This does indeed work on OpenBSD:


$ cat ~/.magic
42 search 42 Itis42file



$ cat file.txt
42 hello



$ file file.txt
file.txt: Itis42file

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 8f129677b9cb95862083058282fbd1a3