xref: /original-bsd/usr.bin/split/split.1 (revision 93bede30)
1.\" Copyright (c) 1990, 1991, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" %sccs.include.redist.roff%
5.\"
6.\"	@(#)split.1	8.2 (Berkeley) 04/01/94
7.\"
8.Dd
9.Dt SPLIT 1
10.Os
11.Sh NAME
12.Nm split
13.Nd split a file into pieces
14.Sh SYNOPSIS
15.Nm split
16.Op Fl Ns Ar number
17.Op Fl b Ar number
18.Op Ar file Op Ar name
19.Sh DESCRIPTION
20The
21.Nm split
22utility reads the given
23.Ar file
24and splits it up into smaller files of 1000 lines each.
25.Pp
26The options are as follows:
27.Bl -tag -width "XXXnumber"
28.It Fl number
29Create smaller files
30.Ar n
31lines in length.
32.It Fl b
33Create smaller files
34.Ar number
35bytes in length.
36.El
37.Pp
38Available operands:
39.Bl -tag -width name
40.It Ar file
41A pathname specifying the
42.Ar file
43to be split.
44If no
45.Ar file
46operand is given, or if a file operand of
47.Dq Li \&-
48is given,
49.Nm split
50reads from the standard input.
51.It Ar name
52If the
53.Ar name
54operand is given,
55the output files will begin with the prefix
56.Ar name
57and each sequential portion of the split file receives a lexically
58ordered suffix in the range of
59.Bq Em aa-zz .
60If the operand
61.Ar name
62is not specified, a default prefix of
63.Em x
64is used, and files are named from
65.Dq xaa
66to
67.Dq zzz .
68.Pp
69.Sh BUGS
70If you provide
71.Ar name ,
72.Nm split
73can only create 676 separate
74files.
75The default naming convention allows 2028 separate files.
76.Sh HISTORY
77A
78.Nm split
79command appeared in
80.At v6 .
81