Questions tagged [archive]

Use this tag for questions about files containing other files and/or folders, that are not covered by a more specific tag like tar, cpio, zip, rar, ar, 7z (in that case only use the specific tags). For generic questions about making security backups and rsync's archive mode, use backup.

Filter by
Sorted by
Tagged with
102
votes
8answers
18k views

Why would I tar a single file?

At my company, we download a local development database snapshot as a db.dump.tar.gz file. The compression makes sense, but the tarball only contains a single file (db.dump). Is there any point to ...
76
votes
7answers
192k views

How to unzip a multipart (spanned) ZIP on Linux?

I need to upload a 400mb file to my web server, but I'm limited to 200mb uploads. My host suggested I use a spanned archive, which I've never done on Linux. I created a test in its own folder, ...
42
votes
8answers
44k views

Is there a parallel file archiver (like tar)?

Is there something out there for parallel archiving of files? Tar is great, but I don't use tape archives, and it's more important to me that the archiving happens quickly (with compression like ...
26
votes
4answers
37k views

Fastest way combine many files into one (tar czf is too slow)

Currently I'm running tar czf to combine backup files. The files are in a specific directory. But the number of files is growing. Using tzr czf takes too much time (more than 20 minutes and counting)....
16
votes
5answers
32k views

View a file in a tar archive without extracting it

I want to view the content of the tarred file without extracting it, Scenario: I have a.tar and inside there is a file called ./x/y.txt. I want to view the content of y.txt without actually ...
16
votes
6answers
16k views

How do I recursively grep through compressed archives?

I'm trying to find out what modules use Test::Version in cpan. So I've used minicpan to mirror it. My problem is that I need to iterate through the archives that are downloaded, and grep the files ...
14
votes
1answer
6k views

tar - How to preserve timestamps down to more than a second of precision?

I am using tar to package a number of files. Modify timestamps on the files are critical, and must be of high accuracy. Using tar -cvf, timestamps are preserved but rounded to the nearest second, i.e. ...
14
votes
5answers
3k views

How to de-unzip, de-tar -xvf — de-unarchive in a messy folder?

Usually, I unarchive things by $ mkdir newFolder; $ mv *.zip newFolder; $ cd newFolder; $unzip *.zip but sometimes I get lazy and just do in an arbitrary folder $ unzip *.zip so time-to-time messing ...
13
votes
8answers
531 views

Is there any program to provide a consistent interface across multiple archive types?

At the moment, if I download a compressed file, it could be any of a .tar.gz archive, a tar.bz2 arhive, a .zip archive or a .gz archive. And each time I do so, I have to remember what the command line ...
13
votes
2answers
4k views

Remove accidentally extracted files [duplicate]

Possible Duplicate: How to de-unzip, de-tar -xvf — de-unarchive in a messy folder? This is a pretty annoying occurrence. Sometimes, I download an archive (tar.gz, tar.bz2, zip, rar, etc) ...
13
votes
3answers
10k views

why should I use tar.xz instead of tar.gz? xz is a lossless data compression program and file format [duplicate]

Today first time in my life I saw tar.xz download. I searched the internet and found Wikipedia articles (xz and XZ Utils) Interesting quote about the users of xz xz has gained notability for ...
10
votes
2answers
13k views

7zip, xz, gzip, tar, etc — what should I use? [closed]

What would you recommend me to use: 7zip, xz, gzip, tar, etc which is more or less available on the most linux distributives and what does compression the best?
10
votes
2answers
4k views

Print archive file list instantly (without decompressing entire archive)

A problem with .tar.gz archives is that, when I try to just list an archive's content, the computer actually decompresses it, which would take a very long time if the file is large. Other file ...
10
votes
3answers
19k views

Create an archive with command “gzip”

I have to create an archive with the command gzip (not tar - it's necessary) and the archive should contain files from another directory - for example, /etc. I tried to use command gzip myetc.gz /etc ...
9
votes
2answers
23k views

“invalid tar magic” on OpenWRT

I'm trying to install JavaSE on a OpenWrt (Pandorabox) device. When I run tar -xvf ejdk-8u65-linux-arm-sflt.tar.gz I get tar: invalid tar magic. How can I solve this problem?
8
votes
1answer
657 views

Make tar (or other) archive, with data block-aligned like in original files for better block-level deduplication?

How can one generate a tar file, so the contents of tarred files are block-aligned like in the original files, so one could benefit from block-level deduplication ( https://unix.stackexchange.com/a/...
6
votes
3answers
4k views

Compression / archiving that keeps permissions and file owner?

I know that similar questions have been asked about permissions, but which form of compression or archiving keeps the permissions and file owners of each file and directory? I was considering the tar....
6
votes
2answers
2k views

If I dd a CDROM, then I always get the exact copy of the CDROM?

If I: dd if=/dev/cdrom of=cdrom.iso then I will always get the exact same, bit-by-bitly same image that is the same as the original CDROM? Or are there any methods that prevents copying all the ...
6
votes
3answers
4k views

tarring in parallel

An Oceanographer friend at work needs to back up many months worth of data. She is overwhelmed so I volunteered to do it. There are hundreds of directories to be backed up and we want to tar/bzip ...
6
votes
1answer
1k views

Tar directory into independent archive files no larger than a certain size

I have a directory containing many files. Together, these files take up several gigabytes of space. I'd like to compress this directory. But compressing the directory into a single file will make ...
5
votes
3answers
2k views

Check if file is an archive; if yes, extract

How can I check if a file is an archive and then extract it with 7z? I understand that I could check it by file command but it won't work in scripts because of its output. I can't predict what type of ...
5
votes
2answers
667 views

What method does unzip use to find a single file in an archive?

Let's say I create 100 files with random text data of size 30MB each. Now I create a zip archive with 0 compression i.e. zip dataset.zip -r -0 *.txt. Now I want to extract just one file from this ...
5
votes
1answer
1k views

Unable to untar file after tar error

After unsuccessful attempt to make a tar.gz file I can't untar the file. It seems like I have lost it and yet this looks like trivial error one should be able to recover from. Is the content of the ...
5
votes
4answers
1k views

Indexed archive format?

I need to create compressed archives of files, and be able to quickly extract individual files/directories from them. The problem is, for example, tar.bz2 seems to be not the best choice for such ...
5
votes
1answer
1k views

Unrar to folder with same name as archive

I have a lot of rar files - Folder/ --- Spain.rar --- Germany.rar --- Italy.rar All the files contains no root folder so it's just files. What I want to achieve when extracting is this structure: -...
5
votes
1answer
2k views

Appending checksum information to file

I'd like to embed checksum information into file, that I transfer. It's tar.gz or tar.xz file and I can only transfer one file to remote side. How do you recommend I embed checksum information? I ...
5
votes
1answer
790 views

How to decompress files from an archive ignoring the file names?

I have several ZIP and RAR archives where the filenames inside the archive are scrambled and they contain invalid filesystem characters like ?-s *-s or !-s or very long file and directory names that ...
5
votes
2answers
1k views

Archive big data into multiple parts

I'm working on big data and I need to archive a directory that is larger than 64 terabytes. I cannot create such large file (archive) on my file system. Unluckily, all proposed solutions for creating ...
5
votes
1answer
647 views

Archive for root file system with quick random access

I need file archive format with the following features It is compressed (not plain tar or iso). It can backup (and restore) linux root file system keeping owners, symlinks, sparse files, devices, etc ...
4
votes
1answer
11k views

Updating tar.gz daily only with changed files [duplicate]

Possible Duplicate: Add/update a file to an existing tar.gz archive? I have some game files I wish to update daily and they create a tar.gz of the folder, but instead of making a full tar.gz of ...
4
votes
1answer
2k views

thunar-archive-plugin - Failed to extract files: No suitable archive manager found

Since we uninstalled ark archiver to use file-roller on Centos 7.4 we are facing an error on thunar with the thunar-archive-plugin. Any action (extract here, extract to, create archive) give this ...
4
votes
1answer
2k views

Is there any way to check the compression ratio of a xz compressed file?

In windows by default one can see the compression ratio of zip files and after installing WinRAR it also supports this feature but currently I am using a linux and have compressed a file using lzma2 ...
4
votes
2answers
1k views

what are the techniques to extract files safely?

Yesterday I was making some experiments on Slitaz. It uses multiple initrd.img's to store files/changes. I wanted to extract one of its initrd.gz images (which is a cpio archive) to a folder, edit/...
4
votes
2answers
676 views

How to untar a file skipping the beginning of the directory structure?

I created tar archives with an absolute path to save the files. /home/mydir/dir1/dir2/dir3/file1.dat /home/mydir/dir1/dir2/dir3/file2.dat /home/mydir/dir1/dir2/dir3/file3.dat I would like to untar ...
4
votes
2answers
391 views

GUI archive manager that works well over ssh

I'm using file-roller and it doesn't work well when my archive file is accessed via ssh (it throws an error when I try to open it). Any alternatives?
4
votes
1answer
2k views

Is there any way to verify the integrity of a xz archive without decompressing the entire archive?

Can I check the integrity of the archive without decompressing it as the archive is 64GB. It is a backup of my old laptop and before i format my old laptop I wanted to verify the backup but it will ...
4
votes
2answers
7k views

How do I extract the filesystem image from vmlinux.bin?

jor1k ships a vmlinux.bin. I think there is an initrd inside, cause I don't know where else it would be. I am trying to extract the filesystem image so I can change it, but I don't know how to. I ...
4
votes
2answers
135 views

Resumable archive

I've a need to archive some big directory structures on an NFS server. They're not likely to be needed particularly soon, if ever - they're just being retained for policy reasons. To this end, I'm ...
4
votes
1answer
137 views

Utility to easily extract archives

A while back I came across a utility that you could pass an archive to and it would not only take care of figuring out the unarchiver to use, but use the correct command line options, and ensure that ...
4
votes
3answers
54 views

Decompressing archive to a single folder

Maybe this is the pinnacle of first world problems, but after years of angst I just have to air this. Let's say you have downloaded funtool.zip in your ~/Downloads folder. You have two choices, each ...
4
votes
0answers
139 views

Split file F into M parts, recover file F from N of those M parts [closed]

I want to split a file into M parts, such that I can recover the file from N of those M parts. (Where M>N, and I get to choose both M and N). For example: I have FILE.IMG I split FILE.IMG into M=3 ...
3
votes
3answers
4k views

file system, archive bit

I am wondering if there are in linux file systems supporting for each file the archive bit https://en.m.wikipedia.org/wiki/Archive_bit I need something with the same logic in native f.s., like ext3,...
3
votes
3answers
537 views

Most “effective” archive to convert to

If you are like me, you have tons of archives lying around in different formats (zip, tar, rar, tgz, tar.bz2 etc). In cleaning up my stuff, I have decided to basically leave my archives alone ( and ...
3
votes
4answers
1k views

Unix unzip is failing but Mac Archive Utility works

I have a bunch of files with a .zip extension that I cannot seem to extract on my HPC: $ unzip RowlandMetaG_part1.zip Archive: RowlandMetaG_part1.zip warning [RowlandMetaG_part1.zip]: 13082642473 ...
3
votes
1answer
106 views

Debian Wheezy Archive EOL Term

Debian Wheezy has reached its EOL (end of life) now. Does it also mean that all its files found here http://archive.debian.org/debian/dists/wheezy/ will be killed and deleted for good one day too? How ...
3
votes
2answers
1k views

What is the advantage of archiving C object files in a static library (.a file)?

I mean, as opposed to just linking to individual modules/object files. Why are groups of modules archived together? Doesn't it make the executable 1. larger, and 2. less secure (i.e. more vulnerable ...
3
votes
2answers
3k views

How can I list the contents of a makeself archive without running it?

I have a makeself archive, and I want to see what it has inside, ie. which files would get extracted, rather than actually run its script part. How do I do that? I would rather not actually extract ...
3
votes
2answers
1k views

How to determine size of tar archive without creating it?

I'm archiving a few directories every night to LTO-7 tape with about 100 or so large (2GB) files in each of them. As a check that the data has been written correctly, I'm verifying that the number of ...
3
votes
1answer
3k views

rsync archive mode

I have been reading plenty of articles regarding rsync and its -a switch. As per theory, I have understood that it preserves a lot of properties like permission, time, group, owner, etc., but why ...
3
votes
1answer
1k views

How to extract a single file from a cpio archive?

I have a cpio archive with lots of files and I need to extract only one file, not all. With tar I could just use tar -xf archive.tar path/to/file, but that does not work with cpio: cpio -i < ...