oreilly.comSafari Books Online.Conferences.


Linux in a Nutshell

This directory of Linux commands is from Linux in a Nutshell, 5th Edition.

Click on any of the 687 commands below to get a description and list of available options. All links in the command summaries point to the online version of the book on Safari Bookshelf.

Buy it now, or read it online on Safari Bookshelf.


split [options] [infile [prefix] ]

Split infile into equal-sized segments. infile remains unchanged, and the results are written to prefixaa, prefixab, and so on. The default prefix is x, giving the output files xaa, xab, etc. If infile is - or missing, standard input is read. See also csplit.


-a n, --suffix-length=n

Use suffixes of length n (default is 2).

-b n[b|k|m] , --bytes=n[b|k|m]

Split infile into n-byte segments. Alternate block sizes may be specified:


512 bytes.


1 kilobyte.


1 megabyte.

-C bytes[b|k|m] , --line-bytes=bytes[b|k|m]

Put a maximum of bytes into file; insist on adding complete lines.

-d, --numeric-suffixes

Use numeric suffixes instead of alphabetic suffixes for the output filenames.

-n, -l n, --lines=n

Split infile into n-line segments (default is 1000).


Print a help message and then exit.


Print a message for each output file.


Print version information and then exit.


Break bigfile into 1000-line segments:

split bigfile

Concatenate four files, then split them into 10-line files named new.aa, new.ab, and so on. Note that without the -, new. would be treated as a nonexistent input file:

cat list[1-4] | split -10 - new.

Linux Resources
  • Linux Online
  • The Linux FAQ
  • Linux Kernel Archives
  • Kernel Traffic

  • Sponsored by: