Linux – Split file into smaller pieces

1. Create a 10MB file named as dummy.

  • dd if=/dev/zero of=dummy bs=1024k count=10


2. Use the split command to break the file into 1MB pieces.

  • split -b 1024k dummy dummy-part-


3. The file will be broken into pieces starting with the file name dummy-part-.

4. If you want to merge the pieces, use the cat command.

  • cat dummy-part* > merged


Done =)

Reference: StackOverflow – Split Files using tar ,gz,zip or bzip2


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.