You seem to be confusing files and directories. At least none of the systems I've worked on support 300000 arguments to a single command:
perl -e '@files = (0 .. 300_000); system("echo @files") and die $!'
Argument list too long at -e line 1.
Could it be @srcfiles actually contains directories? And maybe contains them more than once? (note: tar works recursively). In any case, half a day might be slow or it might be fast, depending on the size of the files. Also, if you've got large tarballs piping the output of tar directly into gzip or compress instead of using a temporary file might be quicker:
my @escaped = map { quotemeta } @directories;
system("tar cv @escaped|gzip >tarfile.tar.gz") and die $!;
Note that you should also be careful about spaces and meta characters in @directories, hence the quotemeta.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.