Samiksha Jaiswal (Editor)

Split (Unix)

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

split is a Unix utility most commonly used to split a file into two or more smaller files.

Contents

Usage

The command-syntax is:

The default behavior of split is to generate output files of a fixed size, default 1000 lines. The files are named by appending aa, ab, ac, etc. to output filename. If output filename is not given, the default filename of x is used, for example, xaa, xab, etc. When a hyphen (-) is used instead of input filename, data is derived from standard input.

To split filename to parts each 50 MB named partaa, partab, partac,....

To join the files back together again use the cat command

or

or even

Additional program options permit a maximum character count (instead of a line count), a maximum line length, how many incrementing characters in generated filenames, and whether to use letters or digits.

Manual

  • split – Commands & Utilities Reference, The Single UNIX Specification, Issue 7 from The Open Group
  • References

    Split (Unix) Wikipedia


    Similar Topics