範例: 將 CentOS-8.3.2011-x86_64-dvd1.iso 分成每個為700MB 的檔案
[root@lab workdir]# split -b 700M CentOS-8.3.2011-x86_64-dvd1.iso "CentOS-8.3.2011-x86_64-dvd1.iso.part-"

預設會以小寫英文為流水號
[root@lab workdir]# ls -lh
total 18G
-rw-r--r-- 1 root root 8.7G Feb 25 10:55 CentOS-8.3.2011-x86_64-dvd1.iso
-rw-r--r-- 1 root root 700M Feb 25 10:57 CentOS-8.3.2011-x86_64-dvd1.iso.part-aa
-rw-r--r-- 1 root root 700M Feb 25 10:57 CentOS-8.3.2011-x86_64-dvd1.iso.part-ab
-rw-r--r-- 1 root root 700M Feb 25 10:57 CentOS-8.3.2011-x86_64-dvd1.iso.part-ac
-rw-r--r-- 1 root root 700M Feb 25 10:57 CentOS-8.3.2011-x86_64-dvd1.iso.part-ad
-rw-r--r-- 1 root root 700M Feb 25 10:57 CentOS-8.3.2011-x86_64-dvd1.iso.part-ae
-rw-r--r-- 1 root root 700M Feb 25 10:57 CentOS-8.3.2011-x86_64-dvd1.iso.part-af
-rw-r--r-- 1 root root 700M Feb 25 10:57 CentOS-8.3.2011-x86_64-dvd1.iso.part-ag
-rw-r--r-- 1 root root 700M Feb 25 10:57 CentOS-8.3.2011-x86_64-dvd1.iso.part-ah
-rw-r--r-- 1 root root 700M Feb 25 10:57 CentOS-8.3.2011-x86_64-dvd1.iso.part-ai
-rw-r--r-- 1 root root 700M Feb 25 10:57 CentOS-8.3.2011-x86_64-dvd1.iso.part-aj
-rw-r--r-- 1 root root 700M Feb 25 10:57 CentOS-8.3.2011-x86_64-dvd1.iso.part-ak
-rw-r--r-- 1 root root 700M Feb 25 10:57 CentOS-8.3.2011-x86_64-dvd1.iso.part-al
-rw-r--r-- 1 root root 435M Feb 25 10:57 CentOS-8.3.2011-x86_64-dvd1.iso.part-am

也可以換成 -n 參數來指定要切分成幾等分
[root@lab workdir]# split -n 10 CentOS-8.3.2011-x86_64-dvd1.iso "CentOS-8.3.2011-x86_64-dvd1.iso.part-"
[root@lab workdir]# ls -lh
total 18G
-rw-r--r-- 1 root root 8.7G Feb 25 10:55 CentOS-8.3.2011-x86_64-dvd1.iso
-rw-r--r-- 1 root root 884M Feb 25 11:01 CentOS-8.3.2011-x86_64-dvd1.iso.part-aa
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-ab
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-ac
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-ad
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-ae
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-af
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-ag
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-ah
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-ai
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-aj

透過cat 指定合併檔案
[root@lab workdir]# cat CentOS-8.3.2011-x86_64-dvd1.iso.part-* > CentOS-8.3.2011-x86_64-dvd1.iso-cp
[root@lab workdir]# ls -lh
total 26G
-rw-r--r-- 1 root root 8.7G Feb 25 10:55 CentOS-8.3.2011-x86_64-dvd1.iso
-rw-r--r-- 1 root root 8.7G Feb 25 11:05 CentOS-8.3.2011-x86_64-dvd1.iso-cp
-rw-r--r-- 1 root root 884M Feb 25 11:01 CentOS-8.3.2011-x86_64-dvd1.iso.part-aa
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-ab
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-ac
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-ad
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-ae
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-af
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-ag
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-ah
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-ai
-rw-r--r-- 1 root root 884M Feb 25 11:02 CentOS-8.3.2011-x86_64-dvd1.iso.part-aj

undefined

arrow
arrow
    文章標籤
    linux split cat
    全站熱搜
    創作者介紹
    創作者 helloworld 的頭像
    helloworld

    Hello World

    helloworld 發表在 痞客邦 留言(0) 人氣()