diff options
| author | Christos Zoulas <christos@zoulas.com> | 2003-05-23 21:31:56 +0000 |
|---|---|---|
| committer | Christos Zoulas <christos@zoulas.com> | 2003-05-23 21:31:56 +0000 |
| commit | 5177b35f61ad66613b2d798c18cc1abf48e89d2a (patch) | |
| tree | cc22f76e6805f61246eed552014d76a6d1d2fda1 /doc | |
| parent | 48c725e9205e6eac572f8b8facc4268ea631bd77 (diff) | |
| download | file-git-5177b35f61ad66613b2d798c18cc1abf48e89d2a.tar.gz | |
magic changes, signness changes, buffer overflow protection, close files.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/file.man | 52 | ||||
| -rw-r--r-- | doc/magic.man | 9 |
2 files changed, 36 insertions, 25 deletions
diff --git a/doc/file.man b/doc/file.man index 4ceb9853..b6a253fa 100644 --- a/doc/file.man +++ b/doc/file.man @@ -1,5 +1,5 @@ .TH FILE __CSECTION__ "Copyright but distributable" -.\" $Id: file.man,v 1.48 2003/03/27 22:47:13 christos Exp $ +.\" $Id: file.man,v 1.49 2003/05/23 21:31:57 christos Exp $ .SH NAME file \- determine file type @@ -153,20 +153,20 @@ Any file that cannot be identified as having been written in any of the character sets listed above is simply said to be ``data''. .SH OPTIONS .TP 8 -.B \-b +.B "\-b, \-\-brief" Do not prepend filenames to output lines (brief mode). .TP 8 -.B \-c +.B "\-c, \-\-checking\-printout" Cause a checking printout of the parsed form of the magic file. This is usually used in conjunction with .B \-m to debug a new magic file before installing it. .TP 8 -.B \-C +.B "\-C, \-\-compile" Write a magic.mgc output file that contains a pre-parsed version of file. .TP 8 -.BI \-f " namefile" +.BI "\-f, \-\-files\-from" " namefile" Read the names of the files to be examined from .I namefile (one per line) @@ -176,11 +176,11 @@ Either or at least one filename argument must be present; to test the standard input, use ``\-'' as a filename argument. .TP 8 -.BI \-F " separator" +.BI "\-F, \-\-separator" " separator" Use the specified string as the separator between the filename and the file result returned. Defaults to ``:''. .TP 8 -.B \-i +.B "\-i, \-\-mime" Causes the file command to output mime type strings rather than the more traditional human readable ones. Thus it may say ``text/plain; charset=us-ascii'' @@ -192,27 +192,28 @@ text file types, directories etc), and makes use of an alternative ``magic'' file. (See ``FILES'' section, below). .TP 8 -.B \-k +.B "\-k, \-\-keep\-going" Don't stop at the first match, keep going. .TP 8 -.B \-L +.B "\-L, \-\-dereference" option causes symlinks to be followed, as the like-named option in .BR ls (1). (on systems that support symbolic links). .TP 8 -.BI \-m " list" +.BI "\-m, \-\-magic\-file" " list" Specify an alternate list of files containing magic numbers. This can be a single file, or a colon-separated list of files. +If a compiled magic file is found alongside, it will be used instead. .TP 8 -.B \-n +.B "\-n, \-\-no\-buffer" Force stdout to be flushed after checking each file. This is only useful if checking a list of files. It is intended to be used by programs that want filetype output from a pipe. .TP 8 -.B \-N +.B "\-N, \-\-no\-pad" Don't pad filenames so that they align in the output. .TP 8 -.B \-s +.B "\-s, \-\-special\-files" Normally, .B file only attempts to read and determine the type of argument files which @@ -233,25 +234,32 @@ to disregard the file size as reported by .BR stat (2) since on some systems it reports a zero size for raw disk partitions. .TP 8 -.B \-v +.B "\-v, \-\-version" Print the version of the program and exit. .TP 8 -.B \-z +.B "\-z, \-\-uncompress" Try to look inside compressed files. +.TP 8 +.B "\-\-help" +Print a help message and exit. .SH FILES +.TP .I __MAGIC__.mgc -\- default compiled list of magic numbers -.PP +Default compiled list of magic numbers +.TP .I __MAGIC__ -\- default list of magic numbers -.PP +Default list of magic numbers +.TP .I __MAGIC__.mime.mgc -\- default compiled list of magic numbers, used to output mime types when +Default compiled list of magic numbers, used to output mime types when the -i option is specified. -.PP +.TP .I __MAGIC__.mime -\- default list of magic numbers, used to output mime types when the -i option +Default list of magic numbers, used to output mime types when the -i option is specified. +.TP +.I /etc/magic +Local additions to magic wisdom. .SH ENVIRONMENT The environment variable diff --git a/doc/magic.man b/doc/magic.man index 8fa53e11..e501e2c0 100644 --- a/doc/magic.man +++ b/doc/magic.man @@ -44,7 +44,10 @@ The string type specification can be optionally followed by /[Bbc]*. The ``B'' 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" +If the magic has +.I n +consecutive blanks, the target needs at least +.I n consecutive blanks to match. The ``b'' flag treats every blank in the target as an optional blank. Finally the ``c'' flag, specifies case insensitive matching: lowercase @@ -177,7 +180,7 @@ the file. The value at that offset is read, and is used again as an offset in the file. Indirect offsets are of the form: -.BI (( x [.[bslBSL]][+-][ y ]). +.BI (( x [.[bslBSL]][+\-][ y ]). The value of .I x is used as an offset in the file. A byte, short or long is read at that offset @@ -237,4 +240,4 @@ indirect offsets. .\" the changes I posted to the S5R2 version. .\" .\" Modified for Ian Darwin's version of the file command. -.\" @(#)$Id: magic.man,v 1.25 2003/03/31 17:52:04 christos Exp $ +.\" @(#)$Id: magic.man,v 1.26 2003/05/23 21:31:57 christos Exp $ |
