Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
21 views

cpio fails to extract files

In the following sequence of commands, why does cpio fails to extract the files previously archived? /home/pkara/Desktop/temp $ ls eBooks myfile.tar /home/pkara/Desktop/temp $ find . -depth -print | ...
1
vote
2answers
56 views

Can tar extract jar files

From https://dzone.com/articles/java-8-how-to-create-executable-fatjar-without-ide tar xf ExecutableOne.jar but why do I get $ tar xf ExecutableOne.jar tar: This does not look like a tar archive ...
1
vote
1answer
36 views

mkfifo to copy / move files

Is it possible to use mkfifo (named pipes) in Linux to copy files? For example: I am extracting files from tar archive and I want them to be moved immediately to another location.
2
votes
3answers
57 views

Determine the number of directories inside a tar file without extracting it

I need to count directories inside an archive file (e.g. tar.bz) without extracting the archive. Note that the archive is too big so that it will be hard to extract then count directories using ls | ...
0
votes
0answers
30 views

Archive all files in current dir [duplicate]

I couldn't found solution on this. How I can tar and gz all files in current dir without sub folders with bash script? I tried with #! /bin/bash tar -czvf all.tar.gz * Echo "archived" ..but ...
0
votes
0answers
26 views

How to make use of tar --verify directly?

This question is about compressing rather large data directories (around 22-23 GiB), specifically the integrity checks of such archives. I do these big backups about once a month, so the time it takes ...
0
votes
2answers
65 views

How to directly compress CURL output as named archive entry?

I've hundred of text files I need to CURL from remote host. Currently I've a loop which download each file and then compress it as new .zip entry. Is it possible to directly pipe CURL's output to an ...
1
vote
3answers
159 views

Tar Splitting Into Standalone Volumes

I have some directories with over 100Gb of data. I'm trying to archive them into smaller volumes i.e. 10Gb each that are independent / standalone. The problem is if I use tar + split, it results in ...
1
vote
1answer
123 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 < ...
-1
votes
2answers
130 views

How can an image file be created for a directory?

How can an image file be created for a directory? For example: https://unix.stackexchange.com/a/90794/674 shows that genisoimage can create an iso image file for a directory. I only know that an ...
5
votes
2answers
602 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 ...
0
votes
0answers
6 views

Least resource heavy file compression method on hosting server

There are many compression formats like tar, zip, bzip etc. On a shared hosting (Linux), if I were to archive a huge folder for migration, which format would be best (least resource heavy)? Storage ...
0
votes
0answers
26 views

Is it possible to dynamically add to a tar.lrz file?

A bit of a basic problem, I'm slightly embarrased I'm running into it, however man lrztar didn't show me any commands for this. Basically, lets say I've got an archiving station which handles ...
0
votes
1answer
37 views

Reading full Names in an Archive or ISO image?

I recently installed Ubuntu 18.04 on my Laptop wanting to learn Linux. I have some Video Courses in ISO Images; whenever I want to extract files from them, I don't get full names for some reason. I ...
0
votes
2answers
104 views

Why does libarchive's bsdtar's unzip throw away the permission bits when reading a ZIP-archive from stdin, but not directly?

I encountered that the command bsdtar from the package libarchive (under Arch Linux, at least) does throw away executable bits of files in .zip-archives when reading from stdin, but not when directly ...
0
votes
2answers
120 views

Unable to create tar with xz compression of a directory to another directory

I am trying to create a tar archive with xz compression of my home directory to another non-existent directory, but it gives me error: tar: Cowardly refusing to create an empty archive The command ...
0
votes
3answers
310 views

Linux determine ZIP size without compression

I would like to make a ZIP file using zip command. Zip file would contain large number of directories containing large numbers of subdirectories, files etc. Is there any way to calculate final size ...
4
votes
1answer
460 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: -...
0
votes
1answer
73 views

Configure PCManFM to automount archives [closed]

How can I setup PCManFM to mount an archive when double-clicking on it? Alternatively, how can I get this option in the right-click menu on an archive? (I used to have this on a machine running the ...
1
vote
2answers
61 views

Is there an archive file format supporting file-level concatenation?

It is a rather theoretical question but is there some (not too obscure) incremental archive format allowing to append to an existing archive using >> or to join several archives using a simple ...
0
votes
1answer
196 views

7zip archive extraction fails [closed]

I'm going to use bigfile, smallfile1, and smallfile2 to always refer to the same file names without file extension. The two small ones don't have any. I created an encrypted 7zip archive using this ...
-1
votes
2answers
44 views

tar + gz files from folder as is without to put inside all sub folder [duplicate]

we want to tar.gz all the following jars files 2.6.4.0-91/spark2/jars/super-csv-2.2.0.jar 2.6.4.0-91/spark2/jars/univocity-parsers-2.2.1.jar 2.6.4.0-91/spark2/jars/validation-api-1.1.0.Final.jar 2.6....
1
vote
0answers
106 views

tar: Potential bug (?) when incremental archive selected - Deleting files in the target

I have quite interesting observation which perhaps is a manifest of a bug. My use case is to: take a backup of a folder, having a set of files from this folder added to --exclude-from file. I'm ...
0
votes
2answers
217 views

mksquashfs: how to include full absolute directory paths inside the squashfs image?

When I create a squashfs image from multiple directories such as: /bin/ /usr/bin/ /usr/local/bin/ /some/other/random/folder/ /another/long/path/ If I use command... mksquashfs /bin /usr/bin /usr/...
0
votes
2answers
30 views

How to physically move a file within the same partition

If I'm working just inside one partition, could I move files around? The idea is to refresh an SD card against bit rot, but without moving the files out and in again.
1
vote
2answers
261 views

Tar directory into archive with the same name as the directory?

Is there an elegant one-liner to tar/archive the whole directory and delete it afterwards? So far I came up with bulky solutions. from: # ls -la drwxr-xr-x 3 root root 4096 Jul 4 15:01 . drwxr-xr-x ...
3
votes
2answers
665 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 ...
1
vote
1answer
35 views

Archive directories with subdirectories not modified in x days

I have been looking for a way to archive our fileserver for some time now but have not found a working solution. The objective is to search through a directory and it's subdirectories for files not ...
3
votes
1answer
250 views

Transform tar into cpio without rooting?

I have a tarball containing many files with root:root owner and/or special device inodes. cpio only accepts paths existing in the file system when it is creating a cpio archive. And I don't want to ...
0
votes
2answers
70 views

`tar c <file> | tar x` writes the file to an unexpected path

If I use the following command: cd /Users/you/foo tar c /Users/you/x/y/z | tar x it will write /Users/you/x/y/z to the local directory to this path: /Users/you/foo/Users/you/x/y/z how can I ...
3
votes
1answer
141 views

How do I extract an “X1 archive”?

I have a strange file without a file extension that's supposedly an archive of the contents of a git repository. According to file (1), it's an "X1 archive": $ file my_git_repo my_git_repo: X1 ...
2
votes
3answers
447 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 ...
0
votes
2answers
2k views

Can't add file to tar: archive/tar: sockets not supported

I'm not sure if this is the right place to ask but I am running a docker build command which is building an image on a mounted Volume. During the process I get this weird error Can't add file /mnt/...
4
votes
3answers
48 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 ...
5
votes
3answers
1k 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 ...
4
votes
1answer
1k 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 ...
1
vote
1answer
44 views

Untar a file over multiple directories/drives

I have a tar.gz file that when uncompressed will use 2 TB of data. On my machine I have 1.5 TB free on one drive and 1.2 TB free on another. I would like to untar this large archive over these two ...
1
vote
1answer
148 views

Problem Unzipping huge zip file

I have issues unzipping a huge zip files containing around 1M files. The zip file is 15GB and uncompresses to ~60GB. When I run unzip file.zip -d /directory/to/unzip/at it uncompresses halfway and ...
0
votes
1answer
721 views

rsync: Why doesn't --archive imply --recursive when --files-from=FILE is used?

Using -r or --recursive causes rsync to recurse into directories. -a or --archive equals -rlptgoD, so -a implies -r. If I have directories source/ and dest/ and I run: rsync source dest then rsync ...
12
votes
1answer
4k 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. ...
2
votes
1answer
290 views

What is wrong with this `zip` command for creating a multi-segment archive?

Looking at this question, I was curious whether a zip command could be used in a file-manager context menu to create multiple 20MB zip files (the level accepted by a gmail message). The answers to ...
0
votes
1answer
83 views

Combining multiple files without tar

I have a directory that contains 400 million files. Using find, I created a list of all the files, which looks like this: /output/custom/31/7/31767937 /output/custom/31/7/317537a /output/custom/31/7/...
2
votes
1answer
485 views

An effective archive method for many duplicate files

WIM format automatically detects duplicate files and archives without duplication. Is there any alternative on UNIX, Linux or Mac?
1
vote
0answers
180 views

Automatically unzip .tgz file when downloaded

When I download a zipped file from chrome, I can see a .tgz in my downloads section ... as such: When I click on it, I get the following screen: and then I have to manually extract it. I don't know ...
2
votes
2answers
511 views

Best way to compress a folder of small pre-compressed files (images)?

I have a folder containing approximate 50GB of images and video files (~35k files) that I'd like to compress into a single file for storage along side a database. Are there any compression options (or ...
2
votes
1answer
91 views

An archive with long filename inside – unarchiver hits filesystem limit and fails

I have an unarchiver that takes in an archive name, and a directory name, and dumps all files from that archive into that directory. No other command-line options. However, someone zipped a file in ...
1
vote
1answer
300 views

Creating a checksum of a 7zip archive being created from a tar file being created

I want to solve a problem (which you can read about here as I don't feel like this should be part of the question). So this is what I came up with: $ tar -cO Templates | 7z a -si -mx=3 -p /t/out.tar....
1
vote
1answer
834 views

Encrypt file list when creating 7zip archive on command line

When creating a 7zip archive with file-roller, there is a checkbox labeled "Encrypt the file list too". And it seems to work as you cannot see the file list when opening an archive created with this ...
0
votes
2answers
999 views

Tar --absolute-names flag does not work

I would like to put everything into an archive from a given directory, while also saving the whole dierctory layout, so superior directory names would be required. I run the following command: tar --...
3
votes
1answer
513 views

How to extract/delete old files from a tarball which has been updated

I've got a tarball named test.tar which I first created it by running: echo start > 1 tar -cf test.tar 1 And then updated it by: echo end > 1 tar -uf test.tar 1 Now if I get a list of files ...