1.\" $MirOS: src/usr.bin/splitb/splitb.1,v 1.5 2008/11/08 23:04:55 tg Exp $
2.\"-
3.\" Copyright (c) 2005
4.\"	Thorsten "mirabilos" Glaser <tg@mirbsd.org>
5.\"
6.\" Licensee is hereby permitted to deal in this work without restric-
7.\" tion, including unlimited rights to use, publicly perform, modify,
8.\" merge, distribute, sell, give away or sublicence, provided all co-
9.\" pyright notices above, these terms and the disclaimer are retained
10.\" in all redistributions or reproduced in accompanying documentation
11.\" or other materials provided with binary redistributions.
12.\"
13.\" All advertising materials mentioning features or use of this soft-
14.\" ware must display the following acknowledgement:
15.\"	This product includes material provided by Thorsten Glaser.
16.\"
17.\" Licensor offers the work "AS IS" and WITHOUT WARRANTY of any kind,
18.\" express, or implied, to the maximum extent permitted by applicable
19.\" law, without malicious intent or gross negligence; in no event may
20.\" licensor, an author or contributor be held liable for any indirect
21.\" or other damage, or direct damage except proven a consequence of a
22.\" direct error of said person and intended use of this work, loss or
23.\" other issues arising in any way out of its use, even if advised of
24.\" the possibility of such damage or existence of a nontrivial bug.
25.\"-
26.Dd March 14, 2005
27.Dt SPLITB 1
28.Os
29.Sh NAME
30.Nm splitb
31.Nd split a file bytewise into pieces
32.Sh SYNOPSIS
33.Nm
34.Op Fl dhkq
35.Op Fl B Ar bufsiz
36.Op Fl b Ar blocksize
37.Op Fl t Ar template
38.Op Fl w Ar width
39.Op Ar file
40.Sh DESCRIPTION
41The
42.Nm
43utility reads the given
44.Ar file
45(or from standard input, if no file is specified)
46and breaks it into smaller files at defined byte boundaries.
47.Pp
48The operation of
49.Nm
50is controlled by the following options:
51.Bl -tag -width Ds
52.It Fl B Ar bufsiz
53Set the size of the buffer to
54.Ar bufsiz .
55Default is 1048576 (1 MiB).
56.It Fl b Ar blocksize
57Set the size of the file to
58.Ar blocksize
59buffers of
60.Ar bufsiz
61each.
62Default is 1.
63.It Fl d
64Toggle the use of decimal respective sedecimal sequence numbers.
65Default is sedecimal.
66.It Fl h
67Display a verbose synopsis.
68.It Fl k
69Set
70.Ar bufsiz
71to 1024 (1 KiB).
72.It Fl q
73Be quiet during operation.
74.It Fl t Ar template
75Specify pathname which is prepended to generated files.
76Default is
77.Dq split .
78.Ar template
79is followed by a dot and three
80.Ns ( Ar width )
81sedecimal numbers (000-FFF) as sequence number; if more than 4096
82(16^3) files are to be generated, it simply runs off unless the
83.Fl w
84option is used.
85.It Fl w Ar width
86Specify the number of sedecimal digits to append,
87in the range from 1 to
88.Dv PATH_MAX \- 2 \- Fn strlen template .
89Default is 3.
90.El
91.Pp
92An additional argument specified is used as the name
93of the input file which is to be split.
94.Sh SEE ALSO
95.Xr cat 1 ,
96.Xr split 1
97.Sh HISTORY
98A
99.Nm
100command appeared in
101.Mx 8 .
102