*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> split (1)              


split(1)							      split(1)

NAME    [Toc]    [Back]

     split - split a file into pieces

SYNOPSIS    [Toc]    [Back]

     split [-lline_count] [-asuffix_length] [file [name]]
     split -bn[k|m] [-asuffix_length] [file [name]]
     split [ -line_count ] [ file [ name ] ]

DESCRIPTION    [Toc]    [Back]

     split reads an input file and writes it in	one or more output files. The
     default size of each output file is 1000 lines. The size of the output
     files can be modified by -b and -l	options. Each output file is created
     with a unique suffix. The suffix consists of exactly suffix_length
     lower-case	letters	from locale. The letters of the	suffix are used	as if
     they were a base-26 digit system, with the	first suffix to	be created
     consisting	of all a characters, the second	with a b replacing the last a,
     and so sorth, until a name	of all z characters is created.	By default,
     The names of the output files are x, followed by a	two-character suffix
     from the character	set as described above,	starting with aa, ab, ac, and
     so	forth, and continuing until the	suffix zz, for a maximum of 676	files.

     If	the number of files required exceeds the maximum allowed by the	suffix
     length provided, such that	the last allowable file	would be larger	than
     the requested size, split will fail after creating	the last file with a
     valid suffix; it will not delete the files	it created with	valid
     suffixes.	If the file limit is not exceeded, the last file created will
     contain the remainder of the input	file, and may be smaller than the
     requested size.

     file is the pathname of the file to be split. If no file is given or file
     is	-, the standard	input will be used. name is the	prefix to be used for
     each of the files resulting from the split	operation. If not given, x
     will be used as the prefix	of the output files.

OPTIONS    [Toc]    [Back]

	  Use suffix_length letters to form the	suffix portion of the
	  filenames of the split file. Default suffix length is	2. If the sum
	  of name and suffix_length option-argument would create a filename
	  exceeding NAME_MAX bytes, split will exit with a diagnostic message
	  and no files will be created.

	  Specify the output file size in bytes	n. With	k specified, an	output
	  file is n*1024 bytes in size;with m specified, a file	is n*1048576
	  bytes	in size.

     -lline_count or -line_count
	  Specify the number of	lines in each output file. line_count is an
	  unsigned decimal integer. The	default	is 1000. If the	input does not
	  end with a newline character,	the partial line will be included in
	  the last ouput file.

									Page 1

split(1)							      split(1)

FILES    [Toc]    [Back]

	  language-specific message file (see LANG on environ(5)

SEE ALSO    [Toc]    [Back]

     bfs(1), csplit(1),	statvfs(2)

									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
split Tru64 Splits a file into pieces
csplit Linux split a file into sections determined by context lines
fsplit OpenBSD split a multi-routine Fortran file into individual files
pssplit IRIX split a PostScript file into separate single-page files
tcpslice FreeBSD extract pieces of and/or glue together tcpdump files
csplit IRIX context split
csplit HP-UX context split
bufsplit IRIX split buffer into fields
strtok Tru64 Split string into tokens
strtok_r Tru64 Split string into tokens
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service