May 2017
Beginner
552 pages
28h 47m
English
All the previous split filenames start with x. If we are splitting more than one file, we'll want to name the pieces, so it's obvious which goes with which. We can use our own filename prefix by providing a prefix as the last argument.
Let's run the previous command with the split_file prefix:
$ split -b 10k data.file -d -a 4 split_file $ ls data.file split_file0002 split_file0005 split_file0008 strtok.c split_file0000 split_file0003 split_file0006 split_file0009 split_file0001 split_file0004 split_file0007
To split files based on the number of lines in each split rather than chunk size, use this:
-l no_of_lines: # Split into files of 10 lines each. $ split -l 10 data.file
The csplit ...