
해결 방법으로내 다른 질문 중 일부스트림을 파일로 파이프해야 하는데 파일의 특정 부분만 파이프해야 합니다.
간단히 말해서, 내가 달성해야 할 것은 다음과 같습니다.
원래 청구서:
mysource > mysource.img
# mysource.img is 500GB
나의 의도:
mysource | stream-take 0 100GB > mysource-0.img
# mysource-0.img is 100GB
#
# some times later, after processing above out file
rm mysource-0.img
mysource | stream-take 100GB 200GB > mysource-1.img
# mysource-1.img is 100GB
...
그런 다음 원격 위치에서 다음 파일을 연결합니다.
cat mysource-* > mysource.img
답변1
다음 명령을 사용해 보십시오 dd
:
mysource | dd bs=1M count=100K skip=0K iflag=fullblock of=mysource-0.img
# some times later, after processing above out file
rm mysource-0.img
mysource | dd bs=1M count=100K skip=100K iflag=fullblock of=mysource-1.img