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.

learn more… | top users | synonyms

0
votes
0answers
20 views

Functions for general backups creating on OS X

I'm trying to create 2 aliases for fast and easy backup of files or folders on OS X. I currently have this: backup () { if [[ $# -ne 1 && $# -ne 2 ]]; then echo "Invalid ...
1
vote
1answer
46 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
26 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)...
4
votes
2answers
59 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 ...
4
votes
3answers
354 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 ...
4
votes
1answer
35 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
39 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:/...
6
votes
1answer
64 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 ( http://unix.stackexchange.com/a/...
93
votes
8answers
11k 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 ...
1
vote
2answers
44 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 ...
1
vote
1answer
32 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
11 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 ...
10
votes
6answers
9k 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 ...
-2
votes
3answers
65 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 ...
0
votes
1answer
97 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 ...
0
votes
1answer
22 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
33 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 ...
23
votes
6answers
15k 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 ...
5
votes
1answer
128 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 ...
-7
votes
2answers
72 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 ...
1
vote
4answers
79 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 |---- ...
5
votes
1answer
2k 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
26 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 ...
1
vote
0answers
52 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, ...
34
votes
5answers
76k 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, ...
0
votes
1answer
106 views

automated script to Cleanup files from a archive folder in unix

I need some help in creating an automated script to delete the log files, text files and other files in our unix archive folder. Could anyone please help me how I need to start with this creation of ...
1
vote
1answer
84 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
65 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
2answers
55 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 `...
3
votes
1answer
48 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
133 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
350 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
80 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
57 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
184 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
76 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 ...
4
votes
3answers
605 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....
0
votes
2answers
195 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 ...
3
votes
5answers
2k 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 ...
2
votes
1answer
57 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 ...
1
vote
1answer
99 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
69 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
868 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
3answers
396 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 ...
4
votes
2answers
517 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
votes
2answers
206 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 ...
3
votes
2answers
4k 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 ...
2
votes
1answer
321 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. ...
2
votes
1answer
204 views

How to run a command against all the files of particular types on a filesystem?

I've just recovered tons of files (distributed in a complex directory structure, having very long names, using Unicode symbols, spaces etc in names) from a damaged hard drive. Now I'd like to verify ...
2
votes
2answers
209 views

Graphical archive manager that uses /tmp

I am looking for a (preferably) graphical archive manager that can be configured to use /tmp as a scratch area for decompressing. My setup is as follows: I have my local workstation with /home ...