• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to split iso or file using ‘split’ command in Linux

by admin

You may need to cut down or split a file into smaller pieces sometimes. This is very useful when you want to cut down a large iso to fit into a DVD or CD. or can also be used to transfer over a network. To split the file into smaller pieces, we can use the split command.

The syntax for the split command is :

# split -b [size of split pieces] [file to split] [split file prefix]

For example to split an iso file image.iso of size 4.6GB into smaller chunks of 2000MB use the below command:

# split -b 1200M image.iso split-file

SIZE of the smaller files to be created may be one of the following, or an integer optionally followed by one of following multipliers:

suffix multiplier
KB 1000
K 1024
MB 1000 x 1000
M 1024 x 1024

This will generate 3 files with the following file sizes. You can specify the file prefix for the smaller files.

# du -sh chunks-a*
2.0G	chunks-aa
2.0G	chunks-ab
0.6G	chunks-ac

To recreate the file, use the cat command.

# cat split-imga* > new-image.iso

The split and cat commands are provided by the coreutils package.

Verify the integrity of the file

Note: To verify that the file has been correctly restored, use the command md5sum before and after splitting the file. Syntax:

# md5sum [filename]

Before spliting

# md5sum image.iso
06caba513738f3af0ac475910e7f8a0f  image.iso

After recreating the file from split pieces

# md5sum new-image.iso
06caba513738f3af0ac475910e7f8a0f  new-image.iso

Filed Under: Linux

Some more articles you might also be interested in …

  1. colrm : command not found
  2. flutter: Google’s free, open source, and cross-platform mobile app SDK
  3. deluser: command not found
  4. CentOS / RHEL : How to convert volume group metadata between LVM1 and LVM2
  5. “git missing” Command Examples
  6. do-release-upgrade Command Examples in Linux
  7. How to Lock and Unlock Zimbra Accounts from Command Line
  8. “glab repo” Command Examples
  9. arduino-builder: A command-line tool for compiling arduino sketches
  10. espeak: Uses text-to-speech to speak through the default sound device

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright