Bug 719141 - Flags are not documented properly in man magic
Summary: Flags are not documented properly in man magic
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: file
Version: 14
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Jan Kaluža
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-05 20:56 UTC by Trever Adams
Modified: 2012-01-04 09:58 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-04 09:58:49 UTC
Type: ---


Attachments (Terms of Use)

Description Trever Adams 2011-07-05 20:56:59 UTC
Description of problem:
In man magic, the flags listed do not appear to match the magic file [BBc] are listed under the string section. Yet in the file you also see cWbt for example.

http://www.manpagez.com/man/5/magic/ seems to list the current options and they seem to match the contents of the magic file.

Version-Release number of selected component (if applicable):
file-libs-5.04-17.fc14.x86_64

Comment 1 Jan Kaluža 2011-07-27 07:11:34 UTC
Hi, I've compared http://www.manpagez.com/man/5/magic/ and "man magic" and they look same... Can you please show me where the difference is?

Comment 2 Trever Adams 2011-07-27 08:38:15 UTC
From the webpage:

              string      A string of bytes.  The string type specification
                          can be optionally followed by /[WwcCtb]*.  The ``W''
                          flag compacts whitespace in the target, which must
                          contain at least one whitespace character.  If the
                          magic has n consecutive blanks, the target needs at
                          least n consecutive blanks to match.  The ``w'' flag
                          treats every blank in the target as an optional
                          blank.  The ``c'' flag, specifies case insensitive
                          matching: lower case characters in the magic match
                          both lower and upper case characters in the target,
                          whereas upper case characters in the magic only
                          match upper case characters in the target.  The
                          ``C'' flag, specifies case insensitive matching:
                          upper case characters in the magic match both lower
                          and upper case characters in the target, whereas
                          lower case characters in the magic only match upper
                          case characters in the target.  To do a complete
                          case insensitive match, specify both ``c'' and
                          ``C''.  The ``t'' flag, forces the test to be done
                          for text files, while the ``b'' flag, forces the
                          test to be done for binary files.

From the man page on fc14:

              string      A string of bytes.  The string type specification
                          can be optionally followed by /[Bbc]*.  The “B” flag
                          compacts whitespace in the target, which must con‐
                          tain at least one whitespace character.  If the
                          magic has n consecutive blanks, the target needs at
                          least n consecutive blanks to match.  The “b” flag
                          treats every blank in the target as an optional
                          blank.  Finally the “c” flag, specifies case insen‐
                          sitive matching: lowercase characters in the magic
                          match both lower and upper case characters in the
                          target, whereas upper case characters in the magic
                          only match uppercase characters in the target.

Comment 3 Jan Kaluža 2011-07-27 09:42:24 UTC
Ah, this is fixed in file-5.07, which is already in F15 and rawhide. I will backport it once there'll be bigger File update for F14. I don't think just manpage change is enough for updating File.

Comment 4 Jan Kaluža 2012-01-04 09:58:49 UTC
Since it's fixed in F15+ and F14 is not supported anymore, I'm closing this bug.


Note You need to log in before you can comment on or make changes to this bug.