Linux commands--file operations--split, append, splice

Source: Internet
Author: User

Suppose the file test1 size is 20MB

(i) DD command

1. Intercept 30 bytes to file test2 on the head of the file test1:

DD If=test1 of=test2 Bs=1 count=32

2. Start capturing 6M size data from 2nd 6M of file Test1

DD if=test1 of=test2 bs=6m skip=1 count=1

3. Through the 2 command, you can write a shell script to split the file into multiple files of different sizes

4. Intercept 30 bytes from the head of the file test1, and then stitch up the 2 6M data to form a 30+6m byte file

DD If=test1 of=test2 Bs=1 count=32

DD if=test1 of=test3 bs=1 count=32

Cat Test3 >> Test2

Linux commands--file operations--split, append, splice

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.