[pve-devel] Xen to Proxmox: one perl question
Gandalf Corvotempesta
gandalf.corvotempesta at gmail.com
Mon Jul 2 20:44:30 CEST 2018
I'm trying to convert my simple bash script to a perl one (hoping
would be included in PVE), for directly convert a Xen VM to a PVE/KVM
on ZFS, in a single pass.
I have one question: can someone tell me how to read a huge tar file
(from a pipe) and extract one file at once?
Something like the following pseudocode:
$myTarFile = TAR::read(my_http_stream)
foreach ( $myTarFile->extract() as $singleFIle ) {
doSomeThing($singleFile)
}
I can't read all files inside the tarball, because this would require
to download the whole file at first,
then read it's content and then read each file one by one. It's too
time consuming.
More information about the pve-devel
mailing list