ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzahz_5.4.0.1/head.htm

73 lines
1.7 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>head - Copy the first part of files</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>head - Copy the first part of files</h2>
<strong>Synopsis</strong>
<p><strong>head [-n</strong> <em>count</em><strong>]</strong>
[<em>file ...</em>]</p>
<p><strong>Description</strong></p>
<p>The <strong>head</strong> utility displays the first <em>
count</em> lines of each of the specified files, or of standard
input if no files are specified. If <strong>-n</strong> is not
specified, then the first 10 lines of the file are displayed.</p>
<p>If more than one <em>file</em> is specified, each <em>file</em>
is preceded by a header consisting of the string "==&gt; XXX
&lt;==" where XXX is the name of the file.</p>
<p><strong>Options</strong></p>
<dl>
<dt><strong>-n</strong></dt>
<dd>Display <em>count</em> number of lines.</dd>
</dl>
<p><strong>Exit Status</strong></p>
<ul>
<li>0 on success</li>
<li>&gt;0 if an error occurs.</li>
</ul>
<p><strong>Related information</strong></p>
<ul>
<li><a href="cat.htm">cat - Concatenate and print files</a></li>
<li><a href="tail.htm">tail - Copy the last part of a file</a></li>
</ul>
<strong>Examples</strong>
<ol>
<li>To display the first 20 lines in the file "myfile".
<pre>
head -n 20 myfile
</pre>
</li>
</ol>
<!-- end ibmbody========================================================= -->
</body>
</html>