Split command usage of linux study notes

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.

 3. Examples

split -b 100m 1111.log (separated by bytes)
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

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326270164&siteId=291194637