0

Let's say I have TAR file with some partition images (dd/patclone/partimage/fsarchiver/whatever) and text file with MD5 sums (of image file and original partitions). I don't want to extract the image to disk. I want redirect extracting stream directly to extracting command which would write it on the fly to the partitions.

  1. Is it possible?
  2. If so, do such stream from extractor goes straight to such command or is it cached in memory (RAM)?

I know that TAR has --to-stdout and --to-command='COMMAND' but I'm not sure do they redirect stream on the fly or content when its ready in some cache?

  • 1
    check out this, seems to be possible: stackoverflow.com/questions/16423484/… – AtomiX84 Jan 10 at 12:10
  • Tar's docs and you say that --to-stdout extracts to stdout... Doesn't that answer your own question? Seems perfect to pipe into dd... Or what exactly does the "I'm not sure do they redirect stream on the fly or content when its ready in some cache?" mean? – Xen2050 Jan 11 at 7:57
  • Its all about RAM and disk. RPI has partition 2GB to place .img files there. The images have sometimes over 1GB so i cant extract them first, and then do the writing to partitions because there is no place there. And also i dont want waste time for it. So piping wont work here. Image writing have to be done DURING extracting from .tar. Also my concern is RAM. Some similar actions on big files take ram for caching the data. RPI Zero has only 1GB. So i have to be sure that stream from tar wont be cached but will go directly to image writer. – 180doman Jan 13 at 9:59

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.