Home » Linux Command Reference » UNIX/LINUX Command – split

UNIX/LINUX Command – split

Last updated May 10, 2021

NAME

split—Split a file into pieces

SYNOPSIS

split [-lines] [-l lines] [-b bytes[bkm]] [-C bytes[bkm]] [–lines=lines] [–bytes=bytes[bkm]] [–line-bytes=bytes[bkm]] [–help] [–version] [infile [outfile-prefix]]

DESCRIPTION

This manual page documents the GNU version of split. split creates one or more output files (as many as necessary) containing consecutive sections of the infile, or the standard input if none is given or the name – is given. By default, split puts 1000 lines of the input file, or whatever is left if it is less than that, into each output file.

The output filenames consist of a prefix followed by a group of letters, chosen so that concatenating the output files in sorted order by filename produces the original input file, in order. The default output filename prefix is x. If the outfile-prefix argument is given, it is used as the output filename prefix instead.

OPTIONS

Option Description
-lines, -l lines, –lines=lines Put lines lines of the input file into each output file.
-b bytes[bkm], –bytes=bytes[bkm] Put bytes bytes of the input file into each output file. bytes is a non-zero integer, optionally followed by one of the following characters to specify a different unit:Put bytes bytes of the input file into each output file. bytes is a non-zero integer, optionally followed by one of the following characters to specify a different unit:
b          512-byte blocks
k          1-kilobyte blocks
m         1-megabyte blocks
-C bytes[bkm], –line-bytes=bytes[bkm] Put into each output file as many complete lines of the input file as is possible without exceeding bytes bytes. If a line that is longer than bytes bytes occurs, put bytes bytes of it 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.
–help Print a usage message and exit with a non-zero status.
–version Print version information on standard output then exit.

Related Posts

UNIX/LINUX Command – rsync

UNIX/LINUX Command – rsync

NAME rsync – a fast, versatile, remote (and local) file-copying tool rsync Command SYNOPSIS Local: rsync [OPTION…] SRC… [DEST] Access via remote shell:Pull: rsync [OPTION…] [USER@]HOST:SRC… [DEST]Push: rsync [OPTION…] SRC… [USER@]HOST:DEST Access via rsync...

UNIX/LINUX Command – strip

UNIX/LINUX Command – strip

NAME strip—Discard symbols from object files. SYNOPSIS strip [ -Fbfdname|–target=bfdname ] [ -Ibfdname|–input-target=bfdname ] [ -Obfdname|–output-target=bfdname ] [-Rsectionname|–remove-section=sectionname ] [ -s|–strip-all ] [-S|-g|–strip-debug ][-x|–discard-all...

UNIX/LINUX Command – expand

UNIX/LINUX Command – expand

NAME expand—Convert tabs to spaces SYNOPSIS expand [–tab1[,tab2[,…]]] [–t tab1[,tab2[,…]]] [–i] [—tabs=tab1[,tab2[,…]]] [–initial] [–help] [–version] [file…] DESCRIPTION This manual page documents the GNU version of expand. expand writes the contents of each given...

UNIX/LINUX Command – uuencode

UNIX/LINUX Command – uuencode

NAME uuencode—Encode a binary fileuudecode—Decode a file created by uuencode SYNOPSIS uuencode [-m] [ file ] nameuudecode [-o outfile] [ file ]… DESCRIPTION uuencode and uudecode are used to transmit binary files over transmission mediums that do not support other...

Follow Us

Our Communities

The Ultimate Managed Hosting Platform
Load WordPress Sites in as fast as 37ms!

0 Comments

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

one + eighteen =

Shares