In Unix, how can I split large files

To split large files into smaller files in Unix, use the split command.
แยกเป็นไฟล์ย่อยให้เล็กลงใน Unix โดยใช้คำสั่ง split

1
split [options] filename prefix

Option
-l linenumber : แบ่งตามจำนวน line
-b bytes : แบ่งตาม size

ตัวอย่าง

1
2
3
1. split -l 500 filename file_
 
2. split -b 40k filename file_

ลองเอาไปใช่กันครับ สำหรับใครที่เจอขนาดไฟล์บน Server ที่ใหญ่มาก ลำบากที่จะเอาลงมาไว้ที่เครื่อง

One Response to “In Unix, how can I split large files”

  1. Quyen Says:

    Wonderful posting, I will be checking back usually looking for improvements.