Questions tagged [archive-tar]

19 questions
12
votes
3 answers

"Untar" file on iPhone

I'm writing an iPhone app which downloads a tar-gzipped file from a Webserver, then needs to unarchive this file so that it can be copied into the app's Documents folder. I'm using tar/gzip because I want to download a whole bunch of small files in…
nikz
  • 498
  • 4
  • 11
5
votes
3 answers

Why does Perl's Archive::Tar run out of memory?

I am using below Perl code to list the files in tar archive. The size of the tar archive is always about 15MB. my $file = shift; my $tar = Archive::Tar->new("$file"); my @lists = $tar->list_files; $tar->error unless @lists; Executing this code…
Space
  • 7,049
  • 6
  • 49
  • 68
4
votes
1 answer

Extract tar archive with empty directories with php PharData

I'm trying to extract a .tar archive by means of PHP. I'm using such a code: $phar = new PharData('test.tar'); $phar->extractTo('/home/user/newtest'); It works fine, but if my archive contains en empty directory it is not extracted by the mentioned…
scrutari
  • 1,378
  • 2
  • 17
  • 33
3
votes
2 answers

How do I create a tar archive that will not expand to a subfolder?

I don't want to create a "flat" tarball that has no internal directory structure. But I want the top-level files to be "loose" rather than mirroring the directory structure they were on originally. Consider: + archives | + data | + site …
Tom Auger
  • 19,421
  • 22
  • 81
  • 104
3
votes
3 answers

TrueZip Random Access Functionality

I'm trying to understand how to randomly traverse a file/files in a .tar.gz using TrueZIP in a Java 6 environment( using the Files classes). I found instances where it uses Java 7's Path, however, I can't come up with an example on how to randomly…
stan
  • 4,885
  • 5
  • 49
  • 72
2
votes
1 answer

Why is Perl's IO:Compress::Adapter::Deflate running out of memory?

I'm trying to set the file permissions of files contained in a tarball with the following: print "Checking $tgz_file... "; my $edited = 0; my $tarball = Archive::Tar->new($tgz_file); my @items = $tarball->get_files(); foreach (@items) { if…
Richard Simões
  • 12,401
  • 6
  • 41
  • 50
2
votes
1 answer

Extract a previous version of file that is stored within a tar archive

I have a tar file which contain different versions of the same file, how can I extract one of the previous version of the file (not the last version) ? here is how to create a test tar file: create a test directory tal@backup:~/tmp$ mkdir…
tals
  • 63
  • 5
2
votes
1 answer

How do I archive an Android repo?

With the usual git repo that I created using git clone, I can easily use git archive to export it to a tar archive, in the case that I am only interested in the current snapshot and not the entire history of the git repository. Can I do the same…
xyz
  • 870
  • 2
  • 8
  • 16
1
vote
0 answers

Golang: Facing error while creating .tar.gz file having large name

I am trying to create a .tar.gz file from folder that contains multiple files / folders. Once the .tar.gz file gets created, while extracting, the files are not not properly extracted. Mostly I think its because of large names or path exceeding some…
Sachin Kadam
  • 265
  • 2
  • 12
1
vote
2 answers

On the fly zip or tar creation?

I may NOT bother with this but if its very simple i may consider it. The site i am working on by design is to hold hundreds of thousands of files. I dont know if we'll have only one download or multiple. Right now the choices are A) Just the file B)…
user34537
1
vote
1 answer

Comparing files from tape and disk using MD5 with perl archive::tar fails

We want to create a report with MD5 checks between an tar archive on tape and the files on disk. I created a script that should do this, but it works correct using a tar file, but it failes when using a tar on tape. The tar was written with gnu tar…
Ronald
  • 31
  • 4
1
vote
1 answer

How do I get PEAR.php with Composer?

I installed pear/archive_tar to work with Phing, which I installed with Composer. However, I received this error: BUILD FAILED exception 'BuildException' with message 'Error reading project file [wrapped: You must have installed the PEAR Archive_Tar…
NobleUplift
  • 5,631
  • 8
  • 45
  • 87
1
vote
0 answers

Code a C program to make .tar file from files and include struct stat

Greetings Stackoverflow, I have a project where I will need to write a C program which generates a .tar archive using files that are specified in the command line arguments. The program is supposed to simulate and work just like the built in tar…
Netmaxweb
  • 21
  • 2
0
votes
2 answers

How to add complete tree structure into a .tar.bz2 file with Perl?

I am looking to compress a lot of data spread across loads of sub-directories into an archive. I cannot simply use built-in tar functions because I need my Perl script to work in a Windows as well as a Linux environment. I have found the…
Bram Vanroy
  • 27,032
  • 24
  • 137
  • 239
0
votes
2 answers

perl untar single file

So running into an issue with my code here not sure what exactly i'm doing wrong i pass it the two arguments it searches for the file but its always going to does not exist. i pass this to the file perl restore.cgi users_old_52715.tar.gz…
Alex B
  • 13
  • 3
1
2