Linux learning note split command usage

1, SPLIT command introduction

The split command can split a large file into many small files, sometimes need to be split into smaller segments, such as increasing readability, generating logs, etc.

2, split command parameters

-b: The value is the size of each output file, and the unit is BYTE.

-C: In each output, the maximum number of BYTEs in a single line.

-d: Use a number as a suffix.

-l: The value of the value of the value is each output file.

3, example

Split -b 100m 1111.log (according to byte)

Split -L 1000000 1111.log (separated by line)

[root @ PPS public_rw] # split -b 100m demo.txt

[root @ PPS public_rw] # split -l 50 demo.txt

Related Posts