BSPLIT 1 "15 July 1998" "Version 2.00"

Table of contents


NAME

bsplit - split a binary file into nnn-byte pieces

SYNOPSIS

bsplit [ -? ] [ -nnn[K|M|G|T|P|E] ] [ -b nnn[K|M|G|T|P|E] ] [ -h ] [ -v ] file(s)

DESCRIPTION

bsplit splits its argument file(s) into nnn-byte pieces. The size of the pieces is determined by the most-recently encountered size option.

Splitting of large files is useful for electronic mail transmission (32KB is the recommended maximum size), to facilitate FTP file transfers over connections that experience fatal timeouts for large files, and for transferring files on personal computer floppy disks.

The split size is always forced internally to be a multiple of 512, which is the minimum block size on most current systems. By ensuring that the parts are multiples of file system blocksizes, corruption of the pieces through addition of padding garbage on some record-oriented file systems can be avoided.

For text files, where it is desirable to split at line boundaries, use split(1) instead.

The split pieces go into parts named like the argument file, but with the suffix -mmm (-001, -002, etc.).

If no files are specified, then stdin is read and split, and the output pieces are named stdin-001, stdin-002, etc.

On IBM PC DOS and DEC VMS systems, where only a single period is allowed in a filename, the suffix is changed to .mmm and it replaces any file extension present in the filename.


OPTIONS

On IBM PC and DEC VMS systems, the option hyphen prefix, `-', may be replaced by a slash, '/'; both are recognized on those systems. The documentation below uses only the hyphen prefix.

Letter case is ignored in option names: -H and -h are equivalent.

-?
Give a brief usage display on stderr and exit with a success status code.
-b nnn[K|M|G|T|P|E] or -nnn[K|M|G|T|P|E]
Define the size, in bytes, of the output pieces; the last one may, of course, be shorter than this. Any size smaller than 1024 will be reset to 1024, and the size will always be rounded up to a multiple of 512 bytes.

The integer value nnn may be optionally followed by a multiplier suffix: K(kilo), M(mega), G(giga), T(tera), P(peta), or E(exa). These correspond to powers of the computer unit 1024, rather than the usual 1000 of the metric system.

If this size option is omitted, then 1423K is assumed; this peculiar number is the size of an IBM PC 3.5in high-density floppy disk, which is a common file transfer medium.

-h
Give a brief usage display on stderr and exit with a success status code.
-v
Display the program version number and date on stderr and exit with a success status code.

SEE ALSO

mail(1), split(1), uucp(1C), uue(1), uuencode(1), uuencode(5), uusend(1C), uux(1C), xxencode(1).

STATUS

This program and its manual page are placed in the public domain.

AUTHOR

Nelson H. F. Beebe
Center for Scientific Computing
University of Utah
Department of Mathematics, 322 INSCC
155 S 1400 E RM 233
Salt Lake City, UT 84112-0090
USA
Email: beebe@math.utah.edu, beebe@acm.org, beebe@ieee.org (Internet)
WWW URL: http://www.math.utah.edu/~beebe
FAX: +1 801 585 1640, +1 801 581 4148
Tel: +1 801 581 5254