|
I'm using Perl's Archive::Tar module. It preserves the file permissions but doesn't preserve the sticky bit. At the other end where I extract the archive, all the sticky bits are gone. I think UNIX/LINUX operating system stores these sticky bits somewhere...
Started by ram on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
From a brief glance, it appears that
$Archive::Tar::CHMOD = 1;
should do what you want, although the documentation claims that the above setting is the default....
To take a look at the Archive::Tar documentation for the details.
|
|
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...
Started by Octopus on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Since Compress:....
It's pure perl, so it's a lot slower then your Archive::Tar heavier on memory than /bin/tar? Yes it is, see previous answer.
From Archive::Tar FAQ :
Isn't Archive::Tar slow? Yes it is.
|
|
I'm using Perl's Archive::Tar module. Problem with it is it pulls everything on to the memory and the does archiving and then writes on to the file system so there is limitation on the maximum file size that can be archived. Most of the times it says ...
Started by ram on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Contrary to Chas....
It looks like Archive::Tar::Wrapper is your best bet.
It looks like there is a different module that doesn't use an in-memory structure: Archive::Tar, it is better than puppet-stringing tar yourself.
|
Ask your Facebook Friends
|
I tar a directory full of JPEG images: tar cvfz myarchive.tar.gz mydirectory
When I untar the archive: tar xvfz myarchive.tar.gz I get an error
tar: Unexpected EOF in archive
Looking at the output, it fails in the middle of one particular JPEG image.
...
Started by Cyrille on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
May be you....
On the same platform as you're tarring on? They may be different versions of tar (e.g., GNU and old-unix would notice if the compression generated errors, yes?
Based on the GNU tar source, it will only archive.
|
|
I want to archive a directory (I don't know whether I can call "I want to tar a directory"). I want to preserve the access permissions at the other end when I un-tar it. I should I tackle this problem in perl.
Thanks for the response but why I'm asking...
Started by ram on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
(I am just guessing, I have never used it myself.) Why do you insist on doing it in Perl?
You can use the Archive::Tar Perl module, or you can execute'; use Archive::....
You might want to look at Archive::Tar on CPAN.
|
|
I am using tar to archive a group of very large (multi-GB) bz2 files.
If I use tar -tf file.tar to list the files within the archive, this takes a very long time to complete (~10-15 minutes).
Likewise, cpio -t < file.cpio takes just as long to complete...
Started by Alex Reynolds on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at serverfault):
As I'm sure that contains information about the files in the... .
Plus it supports longer filenames and has better support for file attributes .
The only archive format I know of that stores an index is ZIP, because I've had to reconstruct tar .
|
|
This question notes that it is possible to overwrite files when creating a tar archive, and I'm trying to see how to avoid that situation.
Normally, I'd use file roller, but the version installed is playing up a bit (using 1.1 Gb of memory), and I'm not...
Started by Andrew Grimm on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
tar -uzvf
That should only add (and overwrite) the file if it's newer than the one in the archive --remove-files remove files after adding them to the archive
But, you refer to cp -i and tar c existing files; don’t overwrite....
|
|
I was planning to do a quick backup of my website. So I tried to run the following command in my webroot:
tar cvfz backup.tar.gz .
That seemed to be working nicely for a while. Until I discovered it had started to backup backup.tar.gz ...
Is there an ...
Started by Svish on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at superuser):
Try
tar cvfz backup.tar.gz *
This way shell extends the....
tar cvfz backup.tar.gz /path/to/www
This link looks like it has the information you might want.
I'm sure there's a nicer way, but I always just do it from the a different directory .
|
|
Hi,
Do you know some library/way in Java to generate tar archive with file names in proper windows national codepage ( for example cp1250 ).
I tried with Java tar , example code:
final TarEntry entry = new TarEntry( files[i] ); String filename = files...
Started by pawelsto on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
If you try a different encoding, the result like your target platform's tar program is interpreting the bytes as ISO-8859-1, which is why non-ASCII values in a tar file header....
tar doesn't allow for non-ASCII values in its headers.
|
|
What's the best way to create a gzipped tar archive with Ruby?
I have a Rails app that needs to create a compressed archive in response to user actions. Ideally, it would be possible to write directly to a compressed file without needing to generate intermediate...
Started by Rich Apodaca on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Running under unix, you could write the files out to disk, then run a system call to tar/gzip them..
|