GNU Info

Info Node: (textutils.info)split invocation

(textutils.info)split invocation


Next: csplit invocation Prev: tail invocation Up: Output of parts of files
Enter node , (file) or (file)node

`split': Split a file into fixed-size pieces
============================================

   `split' creates output files containing consecutive sections of
INPUT (standard input if none is given or INPUT is `-').  Synopsis:

     split [OPTION] [INPUT [PREFIX]]

   By default, `split' puts 1000 lines of INPUT (or whatever is left
over for the last section), into each output file.

   The output files' names consist of PREFIX (`x' by default) followed
by a group of letters `aa', `ab', and so on, such that concatenating
the output files in sorted order by file name in an ASCII locale
produces the original input file.  (If more than 676 output files are
required, `split' uses `zaa', `zab', etc.)

   The program accepts the following options.  Also see Note: Common
options.

`-LINES'
`-l LINES'
`--lines=LINES'
     Put LINES lines of INPUT into each output file.

`-b BYTES'
`--bytes=BYTES'
     Put the first BYTES bytes of INPUT into each output file.
     Appending `b' multiplies BYTES by 512, `k' by 1024, and `m' by
     1048576.

`-C BYTES'
`--line-bytes=BYTES'
     Put into each output file as many complete lines of INPUT as
     possible without exceeding BYTES bytes.  For lines longer than
     BYTES bytes, put BYTES bytes into each output file until less than
     BYTES bytes of the line are left, then continue normally.  BYTES
     has the same format as for the `--bytes' option.

`--verbose'
     Write a diagnostic to standard error just before each output file
     is opened.


automatically generated by info2www version 1.2.2.9