利用split分割大文件

Linux · 2023-12-26 · 45 人浏览

遇到一個問題無法打開1GB的txt文件,會死機,於是用split命令來分割文件
Windows下可以下載Git bash來運行:下載地址

split -l 2000 urls.txt -d -a 2 url_

-l:按行分割,上面表示将urls.txt文件按2000行一个文件分割为多个文件

-d:添加数字后缀

-a 2:表示用两位数据来顺序命名

url_:用来定义分割后的文件名前面的部分。

參考地址

本站立足于美利堅合衆國,請讀者自覺遵守當地法律!如有違規,本站不承擔任何法律責任! This site is based in the United States of America, readers are requested to abide by local laws! If there are any violations, this site does not bear any legal responsibility! Theme Jasmine by Kent Liao