Split command in unix

split command in unix is used to split larger files into smaller files. The splitting can be done on various parameters, like on the basis of lines, byte count or number of output files, etc.
Th syntax for the split command is
The options are 

Let us consider below text file with the following content.  
In the spliting process the newly created files are with the names like xaa, xab, xac, etc.. The file name always starts with 'x'.
  • Split the file on number of lines 
             The output content of this operation is 
  • Changing newly created file names character format to numeric format
           I the above example the newly created file format is xaa,xab,xac, etc...
           So we can change  this format into numeric format by using the below command.
          The new name file are x00, x01, x02, etc...

Powered by Blogger.