Skip to main content

Questions tagged [7z]

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

Filter by
Sorted by
Tagged with
1 vote
0 answers
38 views

How does 7z implement AES encryption?

Questions: Which AES algorithm mode is used in 7z? (Is it ECB, CBC, CFB, OFB, or CTR?) When executing the command 7z a ArchiveName SomeDir -p, how does 7z perform encryption? Does it treat all data ...
behrad's user avatar
  • 31
0 votes
1 answer
51 views

How to test if a file may be an archive on Linux

Context I want to (try) unpack an MSI, Zip (or any archive), or EXE to inspect the contents. I also want to recursively try unpack all extracted files. Using 7zip, I have found I can unpack MSI, Zip, ...
d.j.yotta's user avatar
  • 101
1 vote
2 answers
203 views

Why is 7-zip much faster than other LZMA implementations in Linux?

Until now, I used to backup my data using tar with one of the LZMA compression options (--lzma, --xz or --lzip) I recently noticed that 7-Zip has been ported to Linux in 2021 (https://www.xda-...
ChennyStar's user avatar
  • 1,805
1 vote
1 answer
103 views

Add files from "bash find" to 7z archive

I did quite a bit of searching before asking this! (Even so I'm expecting to have a duplicate pointed out). So I collect a bunch of files, e.g.: find . -name "2020-*" ... is there some way ...
mike rodent's user avatar
  • 1,142
1 vote
2 answers
317 views

How can I multithreadedly extract several 7z archives into their own folder, using the archive name as the folder name?

To extract all 7z archives into their own folder, using the archive name as the folder name, I run the command: 7z x "*.7z" -o* E.g., if one has the two files a.7z and b.7z, then folders a ...
Franck Dernoncourt's user avatar
0 votes
1 answer
32 views

Create archive under Debian right click menu does not allow password protection

When trying to create an archive with Debian GUI using Create archive... from right-click menu and Create a new archive window, is there an option to assign a password to 7z archive?
halt9k's user avatar
  • 101
2 votes
1 answer
157 views

Checking whether all files were extracted correctly

I have a bunch of large zip files on a Synology. The Synology built-in extractor is a bit fiddly, and I'd like to check whether the files were extracted correctly using the commandline. Installed is ...
Zettt's user avatar
  • 173
0 votes
1 answer
188 views

grep text only from files less than x size inside 7z

I have a 7z file that contains binary data and both large (>1Mb) and small (<1Mb) XML files. I want to find only the small XML files that contain a specific string. I've tried using zgrep, but ...
dsaizt's user avatar
  • 11
1 vote
1 answer
296 views

Convert tar to 7z directly?

I have a couple tarballs that are many gigabytes large and contain several thousand files and am wondering if it is possible to convert these to more versatile 7z archives, because the current ...
Cobra_Fast's user avatar
1 vote
0 answers
140 views

Compress Zip to 7zip

I would like a shell (or other terminal based) script to convert zip files to 7z format. Some zip files contain folders with more zip files in them. This needs to work recursively since there are zip ...
Just saying's user avatar
0 votes
2 answers
241 views

7z An Existing Tar File

I am on ubuntu 20.04 and I have a 71GB.tar file that I would like to 7zip before moving it to long-term storage. I can create a new directory.tar.7z using: #tar cf - directory | 7z a -si directory.tar....
Time-Bandit's user avatar
0 votes
0 answers
228 views

Write 7z Log During Archive Creation

Situation: I get daily backups of my vps onto an external hard disk and I create daily "snapshots" using rsyncd into folders named via the date function. Then I use 7z immediately following ...
Time-Bandit's user avatar
0 votes
1 answer
983 views

Recompress 7z archives to tar.zst on the fly

I have a bunch of 7z archives (containing directories and files) that I would like to recompress as tar.zst (which offers much better decompression speeds if / when I need to unarchive them). I could ...
Christophe L's user avatar
2 votes
1 answer
2k views

Why 7z not using enough CPU?

CentOS 9. 3 vCPU VM with 4Gb RAM. I run a cron job with 7z compressing 35Gb data in 150 files 7za a -mx=9 -mmt=3 ... RAM usage - 18%, disk queue is very small, CPU is 61% on average. Why not 100% ? ...
Boppity Bop's user avatar
2 votes
0 answers
311 views

Alternatives to compressed tarballs

I am reading/writing data from/to tapes using Debian and recently ran into an issue where I needed to figure out the size of the stored data stream, i.e. the data actually written to the tape (see ...
leetbacoon's user avatar
0 votes
1 answer
197 views

unrar multiple files wity multiple files

I have 1000s of rar files and list of password in txt. i want to unrar all those files trying all passwords. Tried: for file in "$(ls *.rar)"; do for f in "$(cat pass.txt)"; do ...
Haru Suzuki's user avatar
2 votes
2 answers
15k views

7-zip extraction using multiple cores?

I have stuff.7z.001 to stuff.7z.007. They are big. Is there a way to 7z x in Linux to take advantage of multiple cores and speed things up? also, how does one run the 7-zip gui in rhel/centos 7 ? I ...
ron's user avatar
  • 7,423
0 votes
1 answer
44 views

Difference between two tar commands -cf and -Jchf

I have a python script that is running in two places, two different, but similar commands: os.system("tar cf - -C %s . 2>/dev/null 3>/dev/null | 7za a -p%s -si %s 1>/dev/null 2>/dev/...
Pikk's user avatar
  • 187
1 vote
0 answers
679 views

External extractor '7z' error when extract F/W image use Binwalk

Got error when tried to extract compressed F/W image use Binwalk 2.3.3: WARNING: Extractor.execute failed to run external extractor '7z e -y '%e'': 'module' object has no attribute 'DEVNULL', '7z e -y ...
minto's user avatar
  • 553
3 votes
1 answer
3k views

7z command to create a XZ file

The man page says 7z tool supports 7z, LZMA2, XZ, ZIP, Zip64, CAB, RAR, ARJ, GZIP, BZIP2, TAR, CPIO, RPM, ISO, most filesystem images and DEB formats. And it says we could pass the type as -t{Type}. ...
NayabSD's user avatar
  • 194
4 votes
3 answers
5k views

How to create ".img" from files

I'm trying to alter some files inside an ".img" file. Example: logo-x.squashfs.img romfs-x.squashfs.img safeEnv.img sign.img For that, I extracted the ".img" using 7-Zip and made ...
markfree's user avatar
  • 365
0 votes
1 answer
293 views

Need help with 7z command

I have a file called BaseSystem.dmg which contains a hfs+ system image as well as other files. I am trying to extract just the hfs+ system image file using 7z from the p7zip-full package. I have tried ...
FlexMcMurphy's user avatar
2 votes
0 answers
6k views

Why can't I uncompress a huge file without going out of memory in Linux while Windows can?

I do have a 36GB .zip file to uncompress, which while being extracted will end up freezing the PC because of going oom (out of memory) with file-roller and the unzip command in a freshly installed ...
X.LINK's user avatar
  • 1,344
2 votes
0 answers
458 views

Avoid to fully rewite a 7z file (10 GB) when updating a few files in it

Following the method explained in Incremental backup with 7zip, I can create an archive of 10 GB of documents with 7z u -up0q3r2x2y2z1w2 -mx=0 -p -mhe=on backup.7z /path/to/documents It's encrypted (...
Basj's user avatar
  • 2,581
0 votes
1 answer
1k views

What archival method (tar, zip, 7z, etc) allows me to retain folder modification dates on macOS?

I currently have a directory in a hard drive, say TopFolder which contains 3 subfolders, Folder1, Folder2, and Folder3. When I am in the top level directory of the hard drive, and do: tar cf TopFolder....
user321627's user avatar
8 votes
2 answers
16k views

Preserve file permissions and symlinks in archive with 7-Zip

I have a directory test with three files, ls -l test: total 8 -rw-r--r-- 1 mb mb 16 Jul 25 11:12 regular_file -rwxr-xr-x 1 mb mb 19 Jul 25 11:02 script.sh lrwxrwxrwx 1 mb mb 12 Jul 25 11:14 symlink -&...
Matthias Braun's user avatar
2 votes
1 answer
927 views

GNU parallel + gunzip (or 7z, or bsdtar, or unzip): extract every "archivename.zip" into (to-be-created) its "archivename" subfolder

As in title. I've got a lot of ZIP archives that I want to extract. All archives have their own unique name. All archives contain files only (inside archives there are NOT folder(s) at all: no ...
T. Caio's user avatar
  • 129
1 vote
2 answers
3k views

How to get file names in archive with 7z

Using 7z, I'd like to print the names of the files inside an archive. The output of 7z l myArchive.7z is 7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21 p7zip Version 16.02 (...
Matthias Braun's user avatar
0 votes
0 answers
4k views

Unable to open 7z-Archive: Open ERROR: Can not open the file as [7z] archive

I'm trying to open a 7z-File which I've packed with my phone using the ZArchiver app. Probably the process was interrupted and some files have gone missing, but that's not a huge problem. Ark and ...
Qohelet's user avatar
  • 507
0 votes
1 answer
637 views

7zip client: Compress dirs with method PPMd & compression level Ultra

So today, I am trying to compress multiple folders, of old photos which I want to backup. I've found this article, that says method PPMd, and compression level Ultra, are far better for image ...
Damian G's user avatar
3 votes
5 answers
4k views

Create archive (tar.gz, ...) from file given via stdin

I would like to automatically create a compressed archive from a file given via stdin (or create the archive, if it doesn't exist yet), while specifying the file name that it's going to have inside ...
lug_wrench's user avatar
1 vote
1 answer
2k 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.
KnowledgeSeeker's user avatar
2 votes
1 answer
189 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 ...
rraallvv's user avatar
  • 123
0 votes
1 answer
1k 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 ...
UTF-8's user avatar
  • 3,307
0 votes
1 answer
4k 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 ...
Local Host's user avatar
13 votes
3 answers
18k 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 -...
Alexander Pozdneev's user avatar
3 votes
1 answer
511 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....
vivoru's user avatar
  • 103
2 votes
1 answer
2k 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"...
aswine's user avatar
  • 323
6 votes
3 answers
6k 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 ...
Michał's user avatar
  • 63
1 vote
3 answers
3k 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....
MenorcanOrange's user avatar
2 votes
2 answers
152 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 ...
assynti's user avatar
  • 21
0 votes
1 answer
3k 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 ...
Paul Rougieux's user avatar
1 vote
1 answer
2k 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....
UTF-8's user avatar
  • 3,307
5 votes
1 answer
4k 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 ...
UTF-8's user avatar
  • 3,307
2 votes
0 answers
1k 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 ...
John's user avatar
  • 23
8 votes
2 answers
6k 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 ...
Tom's user avatar
  • 237
1 vote
1 answer
4k 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 ...
Freiheit's user avatar
  • 9,709
0 votes
1 answer
214 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 ...
medicengonzo's user avatar
4 votes
3 answers
21k 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 ...
Vlastimil Burián's user avatar
1 vote
3 answers
2k 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/...
Vlastimil Burián's user avatar