sbase/split.1

49 lines
906 B
Groff
Raw Normal View History

.Dd January 30, 2015
.Dt SPLIT 1
.Os
.Sh NAME
.Nm split
.Nd split up a file
.Sh SYNOPSIS
.Nm
.Op Fl a Ar len
.Op Fl b Ar bytes[k|m|g]
.Op Fl d
.Op Fl l Ar lines
.Op Ar input Op Ar prefix
.Sh DESCRIPTION
.Nm
reads a file, splitting it into smaller files, every
.Ar bytes
bytes
or
.Ar lines
lines. If
.Nm
runs out of filenames before all the data can be written, it stops at the
last valid filename, leaving all the written data on the disk.
The
.Fl b
and
.Fl l
flags are mutually exclusive. Only the last one specified will be obeyed.
.Sh OPTIONS
.Bl -tag -width Ds
.It Fl a Ar len
Set the suffix length to
.Ar len
characters long.
.It Fl b Ar bytes[k|m|g]
start a new file every
.Ar bytes
bytes. The units k, m, and g are case insensitive, and powers of 2, not 10.
.It Fl d
Use decimal suffixes rather than alphabetical.
.It Fl l Ar lines
Start a new file every
.Ar lines
lines.
.El
.Sh SEE ALSO
.Xr cat 1