Make Dt match installed file name.
[netbsd-mini2440.git] / usr.bin / head / head.1
blob593c8f2edc2ec49c66d2420b353b15f8dc3086f3
1 .\"     $NetBSD: head.1,v 1.11 2004/05/04 10:57:42 mrg Exp $
2 .\"
3 .\" Copyright (c) 1980, 1990, 1993
4 .\"     The Regents of the University of California.  All rights reserved.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\"    may be used to endorse or promote products derived from this software
16 .\"    without specific prior written permission.
17 .\"
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" SUCH DAMAGE.
29 .\"
30 .\"     from: @(#)head.1        8.1 (Berkeley) 6/6/93
31 .\"
32 .Dd May 4, 2004
33 .Dt HEAD 1
34 .Os
35 .Sh NAME
36 .Nm head
37 .Nd display first lines of a file
38 .Sh SYNOPSIS
39 .Nm
40 .Op Fl qv
41 .Op Fl n Ar count
42 .Op Fl c Ar byte_count
43 .Op Ar file ...
44 .Sh DESCRIPTION
45 This filter displays the first
46 .Ar count
47 lines of each of the specified files, or of the standard input if no
48 files are specified.
50 .Ar count
51 is omitted it defaults to 10.
53 .Fl c Ar byte_count
54 is specified,
55 .Nm
56 counts bytes instead of lines.
57 .Pp
58 If more than a single file is specified, or the
59 .Fl v
60 option is used, each file is preceded by a header consisting of the string
61 .Dq ==\*[Gt] XXX \*[Le]=
62 where
63 .Dq XXX
64 is the name of the file.
65 The
66 .Fl q
67 flag disables the printing of the header in all cases.
68 .Pp
69 The
70 .Nm
71 utility exits 0 on success, and \*[Gt]0 if an error occurs.
72 .Sh COMPATIBILITY
73 The historic command line syntax of
74 .Nm
75 is supported by this implementation.
76 .Pp
77 This command is mostly compatible with GNU extensions to
78 .Nm .
79 .Sh SEE ALSO
80 .Xr tail 1
81 .Sh STANDARDS
82 The
83 .Nm
84 utility conforms to
85 .St -p1003.2-92 .
86 .Sh HISTORY
87 The
88 .Nm
89 utility appeared in
90 .Bx 3.0 .
91 It was enhanced to include the
92 .Fl c ,
93 .Fl q ,
94 and
95 .Fl v
96 options for
97 .Nx 2.1 .