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
2
votes
1answer
499 views

Faster (uncompressed) archiving tool than tar?

I'm using tar to archive a bunch of files to LTO-7 tape. Generally each file is about 1-2GB, and there can be several hundred of them in each archive (up to ~1TB per archive). At the moment, I'm ...
4
votes
0answers
140 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,...
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 ...
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 ...
1
vote
1answer
555 views

Copy a file from nested tar.gz file

I have a situation where I want to extract a file from nested tar.gz. The structure of .tar.gz is as test.tar.gz data1 data2 data3 test2.tar.gz data4 data5 test.log I want to extract only ...
1
vote
1answer
444 views

How to compress all files in folder and erase the untared versions via command line?

I have a backup disk containing uncompressed versions of my files that I would like to compress to save space on this disk. The disk (containing files to compress) is full (about 3TB with 17GB free). ...
2
votes
1answer
1k views

Opening files within archives from vim

I know that vim can open files within zip or tar{,.gz} archives interactively: open the archive first, then navigate to the correct entry and press enter. lesspipe (https://github.com/wofr06/lesspipe)...
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 ...
11
votes
3answers
20k 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 ...
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 ...
-4
votes
1answer
1k views

Unpack a shell archive (.shar file)

I have a shell script. How can i remove anything before # this line Everything before the # should be deleted. The script is too long to delete it manually. How can I do that automatically? http:/...
102
votes
8answers
19k 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 ...
8
votes
1answer
674 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/...
1
vote
1answer
267 views

How to search recursively within several levels of embedded tar tgz files? [duplicate]

Can somebody help me to figure out a command to find a file recursively that is embedded in a tgz file which is within another tgz files recursively: MainFile.tgz → SubFile1.tgz → SubFile2.tgz → ...
1
vote
0answers
168 views

archivemount (tar) returns before writing complete (sync on write?)

I just learned about archivemount some days ago, and it sounds like exactly the solution I need for a backup problem I have with ecryptfs. However, in my tests, it seems that archivemount exits before ...
-3
votes
2answers
4k views

Bash script that takes a directory name as a command line argument!

Write a Bash Script that takes a directory name as a command line argument and clean the directory by removing all the files with a zero length, with a .tmp or with a .swp extension that is found in ...
1
vote
2answers
464 views

Solaris tar: “symbolic link failed: Not a directory”

When unpacking a tar archive with a symlink under Solaris 10, I get this error: tar: lib/jre/: symbolic link failed: Not a directory The lib/jre symlink points to lib/jre1.8.0_46 which is in the tar ...
0
votes
1answer
61 views

ziping all files in a folder without all directories [duplicate]

I used this command to zip all files in a folder : zip -r fixedrom.zip /sdcard/dbtools/zipfix/fix/ ; It works fine but the zip should be like this : Meta-inf Recovery System Boot.IMG Etc... But ...
0
votes
1answer
146 views

How to issue a tar command when you restore your system

I've recently created a tarball backup of my Ubuntu system (/ and /home partitions both ext4). When I was creating a backup I booted off Live DVD and I used a tar command. Now I wonder which would be ...
5
votes
1answer
805 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 ...
-8
votes
2answers
98 views

Which program is not used for archiving?

Which program is not used for archiving ? Gzip, tar, cpio or zip ? I thought cpio is used to copy files from the archive that is why i am a little confused. Out of the four programs which one is not ...
3
votes
4answers
297 views

Avoid the contents of a .tar begin with './'

I want to make a backup of a directory using tar and xz, but I have a problem. When I open the file, all the files and directories begin with ./ and I don't want this to happen. file.tar.xz |---- ...
9
votes
2answers
24k 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?
1
vote
1answer
68 views

Function for archiving arbitrary files with encryption

I'm no so advanced in bash so can not make my function work properly. Here is the code: archive() { for f in $PWD do for ((i=1; i++;)) do 7za a "$1".7z $f -pSECRET -mhe done ...
5
votes
1answer
664 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
2answers
140 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 ...
0
votes
3answers
778 views

I am trying for a tar call and getting the below error

I am trying to use tar and get the following error: $ tar --strip-components=1 xf /data/rvm-latest.tar.gz  tar: You must specify one of the `-Acdtrux' or `--test-label' options Try `tar --help' or `...
0
votes
1answer
269 views

Uncompressed .lzo files in parallel in both the folders simultaneously and then delete the original .lzo files

So I have .lzo files in /test01/primary folder which I need to uncompress and then delete all the .lzo files. Same thing I need to do in /test02/secondary folder as well. I will have around 150 .lzo ...
3
votes
1answer
119 views

scp .lzo file and then uncompressed and delete the .lzo file

I have a script which copies .lzo files from a remote server. The script will attempt to copy from each of three servers, and will send an email if one of them is down. My script is below and it ...
2
votes
2answers
942 views

Uncompressed .lzo files in parallel and then delete the original .lzo files

So I have .lzo files in /test01/primary folder which I need to uncompress and then delete all the .lzo files. Same thing I need to do in /test02/secondary folder as well. I will have around 150.lzo ...
1
vote
2answers
3k views

How to copy directory structure from one server to another without root user?

I would like to know best way to copy directory structure from one server(Unix) to another (Linux): without root user servers are not connected (e.g. can't use SSH directly between them) I need to ...
4
votes
2answers
702 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 ...
0
votes
2answers
278 views

rsync question syncing source with destination (archiving surplus files on destination)

rsync is pretty clear to me but I have a specific task I could not figure out yet. I want to sync source with destination 1:1. I believe the --delete option would cover that. So if I add a file on ...
0
votes
1answer
1k views

What is the highest compression ratio compressor for pdf, djvu, and images

Comments so far have not been specific with the type of files they needed to compress and didn't reach a definitive answer I have a 1 TB hard drive full of pdf,djvu mostly and the rest are images and ...
1
vote
1answer
825 views

Searching inside archives for specific files and patterns [duplicate]

Is it possible to grep inside a bunch of archives with regular expressions on both the names of the files they contain and the contents of those files? I would like to know which files in which ...
6
votes
3answers
5k 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
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 ...
1
vote
2answers
1k views

Tar - exclude all files in sub folder but not nested folders

I need to create a .tgz archive of the following folder pack | rest | vendor (folder) | ----index.php | ----info.log | another (folder) | ---index.php ...
16
votes
5answers
33k 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 ...
3
votes
1answer
113 views

lrzip compression does not shrink random data

I'm trying to shrink down some big files around 3.0 GB each and I decided to use lrzip after seeing a few benchmarks and such however is it something I'm doing wrong or something as whenever I run ...
2
votes
1answer
529 views

How to brute force ARJ password

The other day I found a 3,5" floppy in my basement. It's one of my backup floppies I used in 1995 and it has several ARJ archives on it. I still have a floppy drive and yes, it is still readable :-) ...
0
votes
2answers
216 views

Protected archive (7z, RAR, Zip) open at a specific time

Are there any compression tools that are unopenable or password-protected until a specific time, at when the security is then lifted? Literally an enforced: "Do not open until --/--/----"
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 ...
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/...
1
vote
1answer
396 views

What are the relative merits of the various standard Unix archival utilities? [closed]

There are many archival tools for Unix, with varying degrees of availability. To make matters more confusing, many of them can write each other's formats. I am seeking more information on their ...
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 ...
1
vote
0answers
359 views

patching an existing flar archive results in “file unchanged”

I'm facing issue, I need to perform a patch of a Solaris flar image and all the commands take quite some time to perform it. To avoid me being in front of it I prepared a script that almost works ...
-1
votes
2answers
358 views

How to compress with bzip2 and gzip using xar?

In the "Why Xar" page of the Xar Google Code page it says: Additionally, this means xar can use different compression methods for each file in the archive. For instance, it might not be a good idea ...
2
votes
1answer
400 views

Backing Up to a Compressed Archive on Linux

How would you go about backing up just some files and subdirectories of a given directory to a compressed archive so that the tree structure could then easily be recreated from that archive. ...