'how to dd part of very big file to a single file (osx)(terminal)
I have a file which is very big. About 50g size , this file is combined by some big file,so it's easy upload and download. but when I want to seperate it, some error happened. In order to count the bytes easier, I use command below, yes, bs is very big and count is 1, it's easy to count. The command can let me get the part from position: 2231358891 ,and get 14691534230 bytes file.
` ( dd bs=2231358891 count=1 of=/dev/null && dd of=/Users/mac/Desktop/test16.dmg count=1 bs=14691534230 ) < test72.dmg
` if bs is smaller, such 1000000000 or smaller , the command worked very well. But ,when bs is too larger ,such as command below, I will get this error :
dd: stdin: Invalid argument
So, Is there some idea to solve it ?
for example, I have a file ,size is 12345678901234 bytes , I want to cut middle part which is from position 1000000000 to position 2000000003, and the position is different everytime I combine some new big file . so I can't use bs*count=(2000000003 - 1000000000) to get bs and count everytime, that's why I user bs=(2000000003 - 1000000000),and count=1. But now, question is when bs too large, dd error although it work well when bs is smaller.
if bs set to smaller ,It worked fine,but the result is not I want to cut.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
