1. Introduction to split command
The split command can split a large file into many small files, and sometimes it is necessary to split the file into smaller pieces, such as to improve readability, generate logs, etc.
2, split command parameters
-b: The value is the size of each output file, in bytes.
-C: The maximum number of bytes in a single line in each output file.
-d: Use numbers as suffixes.
-l: The value is the number of columns for each output file.
-C: The maximum number of bytes in a single line in each output file.
-d: Use numbers as suffixes.
-l: The value is the number of columns for each output file.
3. Examples
split -b 100m 1111.log (separated by bytes)
split -l 1000000 1111.log (separated by number of lines)
split -l 1000000 1111.log (separated by number of lines)
[root@pps public_rw]# split -b 100m demo.txt
[root@pps public_rw]# split -l 50 demo.txt