85 lines
2.3 KiB
HTML
85 lines
2.3 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<html>
|
|
<head>
|
|
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
|
<meta http-equiv="Content-Type" content=
|
|
"text/html; charset=utf-8">
|
|
<title>file - Determine file type</title>
|
|
<LINK rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
|
</HEAD>
|
|
<body bgcolor="#FFFFFF">
|
|
<!-- Java sync-link -->
|
|
<SCRIPT LANGUAGE="Javascript" SRC="../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
|
|
|
|
|
|
|
|
<h2>file - Determine file
|
|
type</h2>
|
|
|
|
<strong>Synopsis</strong>
|
|
|
|
<p><strong>file [-m</strong> <em>MagicFile</em><strong>]
|
|
[-f</strong> <em>ListFile</em><strong>]</strong> [ <em>file
|
|
...</em> ]</p>
|
|
|
|
<p><strong>file [-c] [-m</strong> <em>
|
|
MagicFile</em><strong>]</strong></p>
|
|
|
|
<p><strong>Description</strong></p>
|
|
|
|
<p>In the first synopsis form, the <strong>file</strong> utility
|
|
determines the type of object for the specified <em>file</em>. The
|
|
<strong>file</strong> utility will make a best guess determination
|
|
of the type. The file type is then written to standard output. If
|
|
the pathname is determined to be a regular file, <strong>
|
|
file</strong> examines the first 1024 bytes to determine the type.
|
|
By default, the <strong>file</strong> utility uses the /etc/magic
|
|
file to help identify files that have defined patterns at specified
|
|
byte offsets within the object.</p>
|
|
|
|
<p>In the second synopsis form, the <strong>file</strong> utility
|
|
checks the specified <em>MagicFile</em> for format errors.</p>
|
|
|
|
<p><strong>Options</strong></p>
|
|
|
|
<dl>
|
|
<dt><strong>-c</strong></dt>
|
|
|
|
<dd>Checks a specified magic file for format errors.</dd>
|
|
|
|
<dt><strong>-f</strong> <em>ListFile</em></dt>
|
|
|
|
<dd>Specifies a file containing a list of file names to be tested.
|
|
This <em>ListFile</em> must have only one file per line and not
|
|
contain leading or trailing spaces.</dd>
|
|
|
|
<dt><strong>-m</strong> <em>MagicFile</em></dt>
|
|
|
|
<dd>Specifies the name of the magic file to use. The default magic
|
|
file is /etc/magic.</dd>
|
|
</dl>
|
|
|
|
<p><strong>Operands</strong></p>
|
|
|
|
<p>Each <em>file</em> is a pathname of a file to be tested.</p>
|
|
|
|
<p><strong>Exit Status</strong></p>
|
|
|
|
<ul>
|
|
<li>0 when successful</li>
|
|
|
|
<li>>0 when an error occurred</li>
|
|
</ul>
|
|
|
|
<p><strong>Related information</strong></p>
|
|
|
|
<ul>
|
|
<li><a href="find.htm">find - Find files</a></li>
|
|
</ul>
|
|
|
|
|
|
<!-- end ibmbody========================================================= -->
|
|
</body>
|
|
</html>
|
|
|