Re: file and magic
From: Bill Marcum (bmarcum_at_iglou.com.urgent)
Date: 05/26/04
- Previous message: Alan Connor: "Re: Bash script - telnet"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 26 May 2004 13:43:02 -0400
["Followup-To:" header set to alt.comp.linux.]
On Wed, 26 May 2004 16:13:25 +0100, John Roy
<anon071396@yahoo.com> wrote:
> I'm trying to understand the format of the magic file used by 'file' to
> extract file type data from binary files, usually /usr/share/magic or
> /etc/magic
>
> There seems to be some undocumented syntax in use in this file, at least on
> my system RedHat linux 7.1. In particular
>
> string/b as a type, as in the following example from the magic file on my
> system:
>
> 0 string/b #!\ /bin/sh Bourne shell script text executable
>
> What does the '/b' mean? and more importantly where can I go to get summary
> level information on these extensions?, I've tried man and info, google
> doesn't help.
>
> All help appreciated. Sorry if I've faux pas'd
>
On my Debian system, it's documented in "man 5 magic":
string A string of bytes. The string type specification can
be optionally followed by /[Bbc]*. The
-- May 25 International Towel Day, in honour of Douglas N. Adams
- Previous message: Alan Connor: "Re: Bash script - telnet"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]