Subject: | archive is memory resident and not disk based |
I want to create huge tar archives, bigger than system memory.
The man-page says:
NAME
Archive::Tar::Streamed - Tar archives, non memory resident
(...)
Archive::Tar::Streamed provides a wrapper, which allows working with tar
archives on disk, with no need for the archive to be memory resident.
But my testprogram proves the opposite:
framstag@diaspora:/tmp: ll Idiocracy.mpg
-rw-r--r-- framstag users 838303984 2010-12-13 16:16:35 Idiocracy.mpg
framstag@diaspora:/tmp: ./tar.pl tmp.tar Idiocracy.mpg
Out of memory!
framstag@diaspora:/tmp: cat tar.pl
#!/usr/bin/perl -w
use Archive::Tar;
use Archive::Tar::Streamed;
$usage = "$0 archive-name files...\n";
$name = shift or die $usage;
@files = @ARGV or die $usage;
open $tf,'>',$name or die $!;
$tar = Archive::Tar::Streamed->new($tf);
$tar->add(@files);