Hamilton LaboratoriesHamilton C shell 2012User guideExternal utilities


Oregon Coast

Previous | Next

        Split a Large File into Chunks

Usage:  split [-bhs<size>-] [ infile [prefix] ]

   split breaks up a large file into chunks, written to a series
   of output files formed of the prefix plus a .nnn extension,
   where nnn is a 3-digit decimal number.  The default prefix is
   'chunk'.  Each chunk will be of the specified number of lines
   or bytes.  If only one operand is given, it's assumed to be
   the input filename unless -s is specified.


   -h         Help.  (This screen.)
   -b         Count bytes.  (Default is lines.)
   -s         Stdin is split.  (Implied if no files are specified.)
   -<size>    Chunk size.  (Defaults are 3000 lines/300000 bytes.)
   --         End of options.

Previous | Next