Kailash Subramanian writes ..

>     What is the best way to create a tar archive using Archive module
>for a large directory structure with some 5000 files ? Currently I am
>using UNIX tar for this.
>Do I read all the files and directory and then use Archive 
>module to tar them?
>If anybody can give me an idea for the syntax, I would appreicate.


while you could drill down using File::Find and add the files to the tar
directory by directory - probably if the directory structure is particularly
complex it'd be best to just call the shell to do the tarring with the
external tar command (rather than the Perl module Archive::Tar)

the performance overhead of starting the shell process will quickly become
insignificant compared to the tarring operation .. and the external 'tar' is
probably going to be quicker at recursively tarring a large directory tree
than Perl and File::Find and Archive::Tar

-- 
  jason king

  It is illegal to "annoy a bird" in any city park of Honolulu, Hawaii.
  - http://dumblaws.com/

Reply via email to