Split file by line number - Ubuntu
- Bilal Malik
- Jul 5, 2021
- 1 min read
We can run the below command to split the large file in Ubuntu.
split --numeric-suffixes=1 --additional-suffix=.csv -l 100 original.csv split_
Explanation:
For example, if we have file original.csv which has 200 lines. The above command will split the file by every 100 lines. It means it provides two files split_01.csv(100 lines) and split_02.csv (100 lines).
Comments