I am aware that you can extract a single file from tar
.
tar -xf file.tar.gz /small/single/file
I intend to run this on an embedded system with limited disk/ram. I'd like to know how this command handles large tarballs.
Does extracting a single file cause the entire tarball to be decompressed into memory? I don't mind decompressing it all, but as long it does so with a small buffer.
Let's say I have 100MB of RAM avaible and 5MB of disk space available. Also, /small/single/file
is under 5MB. Also, the source tarball is 500MB. Can I safely extract /small/single/file
?