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 [7z]

7z is a compressed archive file format. It's also an application that handles multiple compression formats.

0
votes
1answer
34 views

Batch 7zip all files separately in a directory (Centos 7.6)

I am trying to 7zip all files inside a directory separately into their own archive (for each file) in Linux Centos 7.6. Been looking around for a while but never found a method.
3
votes
1answer
32 views

How to obtain only fully decompressed files in destination folder when decompressing zipped file?

I'm trying to decompress a big zip file containing more that a hundred files, 128 MB each. When the decompression is interrupted, I have to delete the last file that was being decompressed, and ...
0
votes
1answer
200 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
1answer
214 views

How to split a compressed file?

I have a 44GB 7z compressed file that I compressed with lzma2 and it took around 11 hours (original file is a text file of 285GB). 7z a -t7z Files.7z -m0=lzma2 -mx=9 -aoa So, what I want is to do is ...
2
votes
2answers
663 views

Extracting a specific file from an archive using 7-Zip

I run Linux Live CD and I need to extract a specific file from a wim-archive that is located on a disk drive. I know a full path to the file in the archive: xubuntu@xubuntu:~$ 7z l winRE.wim | grep -...
3
votes
1answer
39 views

Create separate 7z archives for each directory in the current directory and additionally parallelize through GNU Parallel

I have about two hundred sub-directories located within a directory of interest: $ ls backup 201302 201607 201608 201609 201610 201701 201702 201705 201801 201802 I want to create a 7z archive xyz....
2
votes
1answer
148 views

How can I combine multiple 7z archives into one?

I'm trying to make a bash script that takes a large number of 7z archives and combines them into one archive. Here's what I have so far. #!/bin/bash DUMPPATH="/home/backups/dumps/" NEWPATH=$DUMPPATH"...
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 ...
0
votes
0answers
443 views

extract multipart 7z files in centOS terminal

How do I extract multipart 7z files (doc.7z.001, doc.7z.002...., doc.7z.060) in centOS terminal? I tried concatenating all the parts to a single file using this command below, cat doc.7z* > ./docs....
1
vote
0answers
57 views

Parsing command output as multiple separate command switches [closed]

I'm currently working on an automation for some backup task and want to zip some Jails from FreeBSD with mounted parts. This is what I have so far: #!/bin/sh for f in /mnt/Media/Jails/*; do echo "---...
2
votes
2answers
70 views

bash script: a more elegant way to perform these operations:

I have these three files: file.txt.7z = 5.4GB file-1.txt.7z = 251M file-2.txt.7z = 7.7M And they are the only files in a directory: $ tree . ├── file.txt.7z ├── file-1.txt.7z └── file-2.txt.7z I ...
0
votes
1answer
583 views

How to overwrite content in a 7z archive created from a pipe?

Purpose I'm creating a function that dumps a database table to a compressed 7z file. The output of mysqldump is piped to 7zr with the -si switch. There should always be one file and one file only 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
836 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 ...
1
vote
0answers
378 views

Create a 7z archive without compression using Ark

I'm using KDE on Debian Stretch, and Ark is installed by default (version 16.08.3). I find it really convenient and easy to use. However, I cannot find a way to create a 7-zip archive without ...
3
votes
2answers
640 views

How can I repack zip to 7zip?

How can I safely and quickly repack a zip archive to a 7zip archive? I checked options of 7zip program but I don't see any option to repack. I know I can extract to directory and then pack this ...
1
vote
1answer
917 views

Validate password for a large set of zip files

I am working on an ETL process for a customer. Another vendor has provided the raw data as a set of approximately 100 password protected ZIP files. I want to validate that the password given is ...
0
votes
1answer
67 views

gzip uncompressing a bigger file than it lists

So when I use the list flag of gzip the uncompressed size is listed as 3.5g (with ratio of -9.0%): $ gzip -l piTorrentbox101216.gz compressed uncompressed ratio uncompressed_name ...
2
votes
3answers
9k views

file-roller: An error occurred while loading the archive (Zip/7z)

As I don't use GUI for archive extraction much, I don't know since when this error I am getting: An error occurred while loading the archive. This error I get while trying to open an ordinary Zip ...
1
vote
3answers
171 views

What is the proper way to use an alternative binary

I am on Linux Mint 18 Cinnamon 64-bit. I have these binaries of 7z and their versions on my system: /usr/bin/7z 7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18 and /usr/local/...
0
votes
2answers
418 views

File zipped using 7za cannot be unzipped using zip utility

I have created this file using 7za command called test.war # file test.war test.war: 7-zip archive data, version 0.4 I am trying to extract this file in another RHEL machine using command : # unzip ...
5
votes
3answers
6k views

How to specify character encoding for 7z?

Doing "7z x" on archive gives me '20 ª.1 ¯® '$'\302\212''¨à®¢®£à ¤áª ï ã«.rtf' IMG_6527.JPG ''$'\302\212''¨à®¢®£à ¤áª ï, ¨áâ.doc' IMG_6532.JPG ''$'\302\204''®¯ ᮣ« è¥­¨¥(3).doc' ...
0
votes
1answer
394 views

7zip and Move Files with Spaces in Bash Script [duplicate]

I'm trying to 7zip and move some files that look like this: ./[1998] - This year's book.pdf ##note the brackets, spaces, and apostrophes My script looks like this: for file in `ls ./unprocessed/*....
0
votes
1answer
295 views

How to use 7z and “for file” with multiple file inputs?

I have multiple files in a folder like: 1.txt 2.txt 3.txt ... 100.txt And I want to use 7z to compress single files, generating 1.7z, 2.7z 3.7z... I'm trying to use this: for file in {1..100} ./{1.....
1
vote
2answers
2k views

How to get number of files in a 7z

I want to get the number of files (included directories) contained in the root of a 7z archive, but the 7z command on Linux don’t bring a simple way to only get the number and noting else. For ...
0
votes
1answer
2k views

E_FAIL Error in 7zip

I've done a Backup some time ago using 7zip, in which I split the Files in 14 2GB (approximately) files. I'm running Ubuntu Server 15.10. This is what I'm trying to run in order to extract them: 7z ...
1
vote
1answer
3k views

Command to verify CRC (CRC32) hashes recursively

With the commands md5sum, sha1sum, sha256sum I can take a text file having an hash and a path per line and verify the entire list of files in a single command, like sha1sum -c mydir.txt. (Said text ...
1
vote
1answer
310 views

How to use bash to archive all directories?

I'm trying to learn bash -slowly- but finding it difficult to get a grasp of the more technical aspects without a real-word example that fits something I would want to use. To that end, I'd like to ...
1
vote
1answer
60 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 ...
0
votes
1answer
4k views

Compressing files using p7zip from the command-line

I would like to compress four ISO files using 7z into a new archive called ISOs.7z from the command-line on my Sabayon machine. These are the commands I have tried so far (I know none of these specify ...
1
vote
0answers
277 views

Pass passwordlist to 7zip

I'm writing a shellscript to automate my 7zip, rar etc extraction tasks. Normally JDownloader2 does this for me when I download files through it, but when I download files by hand I will still need to ...
5
votes
2answers
2k views

Get percentage information from 7z command in bash

With archives containing more than 30 files, list of extracted files quickly stops being interesting. I a making a script that extracts a .war archive into a tomcat app folder: When looking in help ...
1
vote
1answer
1k views

7z is not excluding directories from exclude file

In a bash script I want to create an archive with 7z and exclude some directories. I created an exclude file that only contains one entry: excl_dir/ My script: #!/bin/bash archiveName="my_archive" ...
6
votes
3answers
7k views

How to compress a mysql dump using 7z via a pipe?

I've been attempting to compress my mysqldump output via 7z using the pipe operator (I have seen this question, but its answer uses xz not 7z). This is what I have tried so far: mysqldump -u root -p ...
0
votes
1answer
124 views

CentOS Crontab - Extract particular file name

Let's assume that I have a file with extension of .7z and I have a crontab that extracts this file. But the name is unknown, only the extension is known, is it possible to extract it from crontab? ...
4
votes
2answers
4k views

7za - Extract file with password

I have a .7z file which I need to extract the contents of. The problem is, that it's password protected and currently, I have to SSH into the server and enter the password. I would like to this ...
1
vote
1answer
225 views

7za with password not working while extraction

I am creating a password protected file using 7za, command: 7za a /usr/test/loc/file.del.7za /usr/test/loc/file.del -p .... Creating archive /usr/test/loc/file.del.7za Enter password (...
2
votes
1answer
2k views

Linux 7zip destination folder?

I want to zip with 7zip a folder to specific destination. There is in manual a guide to use -o{folder} but how does it really work? Example: 7z a -t7z backup1 /home/example/folder -o/home/backups/...
1
vote
1answer
931 views

How to undo and revert an accidental `7z e`

I accidentally typed 7z e archive.7z and all the files ended up in my home directory when I wanted to extract them in a subfolder. How can I clean the mess and remove all those files?
2
votes
1answer
3k views

How to use PPMD with 7z under Linux?

How can I use the 7z compression with PPMD algorithm? It produces better compression than the default in 7z.
-2
votes
1answer
187 views

7z command for unzip -p -a [duplicate]

I have a command line execution in my .sh file which unzips the file which is in zip format. Below is the command which unzips the file unzip -p -a. elif [ "${FILECOMMANDOUTPUT}" = "Zip" ] then ...
-2
votes
2answers
2k views

Corresponding 7zip command for unzip -p -a

I have a question regarding unzip command in Unix. As of now my Unix command unzip -p -a is able to zip the file which are lesser in size. But if the file size is larger then the command is not able ...
0
votes
2answers
508 views

Why don't the servers use 7z?

By default on a UNIX machine install, I can see the logs are rotated with gzip. Question: Why doesn't the UNIX world use by default 7z? It would be much more efficient than gzip.. I just compressed ...
0
votes
1answer
1k views

Extracting a 2.7GB 7z file

I currently have a 2.7GB 7z file that backed up my computer (it extracts to about 6.2GB of data) I am running on a Chromebook with Crouton. The Chroot is running Kali with a Unity front end. I am ...
1
vote
3answers
981 views

What is the correct way to upgrade 7zip on Solaris 10?

I currently have an old old version of 7zip installed (4.55 beta) on Solaris 10. It is located in /usr/bin/7z. Found using which 7z I have downloaded a new version 9.20.1. The README says to edit the ...
2
votes
1answer
352 views

Can p7zip create smaller zip files than winzip?

7-Zip for Windows creates smaller zip archives than WinZip, so presumably P7zip can create smaller zip archives than Zip in Linux. So how do I create zip files using P7zip in Linux?
1
vote
1answer
474 views

How to extract the Nth file using 7-zip

I have an archive which, for reasons beyond my comprehension, contains 900 files all with the same name. That means that if I ask 7zip to extract them all, at the end there is just one file. The ...
2
votes
1answer
941 views

Delete files in .7z package

I am using FileRoller to manage the *.7z and using Ubuntu 12.10. When the *.7z file is encrypted, I can add new files to the package, I can modify text files, can I delete files too?
14
votes
4answers
17k views

How to use 7z to compress via pipe?

I'm using this for creating backups securely (? - is it really secure? with a good password?): # ENCRYPT ORIGDIR="DIRECTORYNAMEHERE"; tar cvf - "${ORIGDIR}/" 2>/dev/null | gzip -9 - 2>/dev/...
9
votes
2answers
5k views

Add a file to a different path in a zip file

I have a file that placed in the following directory: folder_A/another_folder_A/file_to_add.xml Now, what I want to do is simply add the file to a folder in an existing zip archive. For example ...