Tag: archivers

How to add the plugin to Double Commander to support all types of archives

What archives does Double Commander support?

Double Commander is an excellent open source two-window file manager. If you want to know more details about it, then see the article “Free analogue of Total Commander”.

Double Commander, thanks to built-in plugins, out of the box supports working with the most popular archives: zip, jar, tar, bz2, tbz, gz, tgz, Izma, tlz, xz, txz and zipx.

This is a good set, but in this tutorial I will show you how to add a plugin to Double Commander, thanks to which it will support the following archives (this list also contains virtual disk files and file systems):

	7z:       [7z; ]
	APM:      [apm; ]
	Ar:       [ar a deb lib; ]
	Arj:      [arj; ]
	bzip2:    [bz2 bzip2 tbz2 tbz; * * .tar .tar]
	Cab:      [cab; ]
	Chm:      [chm chi chq chw; ]
	Hxs:      [hxs hxi hxr hxq hxw lit; ]
	Compound: [msi msp doc xls ppt; ]
	Cpio:     [cpio; ]
	CramFS:   [cramfs; ]
	Dmg:      [dmg; ]
	ELF:      [elf; ]
	Ext:      [ext ext2 ext3 ext4 img; ]
	FAT:      [fat img; ]
	FLV:      [flv; ]
	gzip:     [gz gzip tgz tpz; * * .tar .tar]
	GPT:      [gpt mbr; ]
	HFS:      [hfs hfsx; ]
	IHex:     [ihex; ]
	Iso:      [iso img; ]
	Lzh:      [lzh lha; ]
	lzma:     [lzma; ]
	lzma86:   [lzma86; ]
	MachO:    [macho; ]
	MBR:      [mbr; ]
	MsLZ:     [mslz; ]
	Mub:      [mub; ]
	Nsis:     [nsis; ]
	NTFS:     [ntfs img; ]
	PE:       [exe dll sys; ]
	TE:       [te; ]
	Ppmd:     [pmd; ]
	QCOW:     [qcow qcow2 qcow2c; ]
	Rar:      [rar r00; ]
	Rar5:     [rar r00; ]
	Rpm:      [rpm; ]
	Split:    [001; ]
	SquashFS: [squashfs; ]
	SWFc:     [swf; ~.swf]
	SWF:      [swf; ]
	tar:      [tar ova; ]
	Udf:      [udf iso img; ]
	UEFIc:    [scap; ]
	UEFIf:    [uefif; ]
	VDI:      [vdi; ]
	VHD:      [vhd; ]
	VMDK:     [vmdk; ]
	wim:      [wim swm esd; ]
	Xar:      [xar pkg; ]
	xz:       [xz txz; * .tar]
	Z:        [z taz; * .tar]
	zip:      [zip zipx jar xpi odt ods docx xlsx epub; ]

P7z-usr plugin for Double Commander

P7Z Usr is a plugin for Double Commander (DCMD) that provides 7-Zip file archiving functionality.

The plugin is open source and targets Linux platforms. Its main module is P7ZIP, a 7-Zip port for POSIX systems.

For more details on 7-Zip, see the article “Free alternative to WinRAR”.

Plugin for Double Commander that adds 7-Zip compatible archives. Formats: 7z, Udf, VHD, SquashFS, NTFS, Rpm, Chm and others. Based on the 7-Zip and P7ZIP projects.

How to install P7Z Usr on Linux

Installing Debain, Linux Mint, Ubuntu, Kali Linux and their derivatives

It assumes that Double Commander is already installed on your system. If not already, then run the following command:

sudo apt install doublecmd-gtk

For the plugin to work, the p7zip package is required, install it if it is not already on your system:

sudo apt install p7zip-full

Now let's proceed to install the plugin itself.

wget -O p7z_usr.zip https://github.com`curl -s https://github.com/ike9000e/p7z-usr/releases | grep -E -o '/ike9000e/p7z-usr/releases/download/[0-9.v]+/p7z_usr_.*_a64.zip' | head -n 1`
unzip p7z_usr.zip
rm p7z_usr.zip License.txt readme.txt
sudo mkdir /usr/lib/doublecmd/plugins/wcx/p7z_usr
sudo mv p7z_usr.ini p7z_usr.wcx /usr/lib/doublecmd/plugins/wcx/p7z_usr
sudo ln -s /usr/lib/p7zip/7z.so /usr/lib/doublecmd/plugins/wcx/p7z_usr

Installation on Arch Linux, BlackArch, Manjaro and their derivatives

It assumes that Double Commander is already installed on your system. If not already, then run the following command:

sudo pacman -S doublecmd-gtk2

For the plugin to work, the p7zip package is required, install it if it is not already on your system:

sudo pacman -S p7zip

If you have not yet installed the pikaur utility, then install it according to the “Automatic installation and update of AUR packages” article. Then it is enough to execute the command:

pikaur -S doublecmd-plugin-p7z-usr

How to activate P7Z plugin Usr in Double Commander

In Double Commander, in the menu, go to Settings → Options.

Find the Plugins section, go to WCX Plugins: and click the Add button:

Find and add the file located at the path /usr/lib/doublecmd/plugins/wcx/p7z_usr/p7z_usr.wcx

When prompted to enter the file extensions that the plugin should work with, you can enter the following (edit the list to suit your needs):

7z apm ar arj bz2 bzip2 tbz2 tbz tar cab chm chi chq chw hxs hxi hxr hxq hxw lit msi msp doc xls ppt cpio cramfs dmg elf ext ext2 ext3 ext4 img fat flv gz gzip tgz tpz gpt mbr hfs hfsx ihex iso lzh lha lzma lzma86 macho mslz mub nsis ntfs exe dll sys te pmd qcow qcow2 qcow2c rar r00 rpm 001 squashfs swf ova udf scap uefif vdi vhd vmdk wim swm esd xar pkg xz txz z taz zip zipx jar xpi odt ods docx xlsx epub

The previous list includes all supported extensions, this list is shortened by excluding office and some other formats:

7z apm ar arj bz2 bzip2 tbz2 tbz tar cab chi chq chw hxs hxi hxr hxq hxw lit msi msp cpio cramfs dmg elf ext ext2 ext3 ext4 img fat flv gz gzip tgz tpz gpt mbr hfs hfsx ihex iso lzh lha lzma lzma86 macho mslz mub nsis ntfs dll sys te pmd qcow qcow2 qcow2c rar r00 rpm 001 squashfs swf ova udf scap uefif vdi vhd vmdk wim swm esd xar pkg xz txz z taz zip zipx xpi

Plugin added - configure it by clicking the “Tweak” button.

Features and Limitations

P7Z Usr Plugin Features:

  • can view or extract all archives that the 7-zip library can open;
  • configuration via INI file (documentation is supplied with the plugin);
  • must be compatible with P7ZIP library versions P7ZIP> >= 15.09.

P7Z Usr Plugin Limitations:

  • only reading;
  • multi-volume archives are not supported;
  • no file attributes;
  • no Rar5 (only can show files in the archive).

How to open a Linux drive on Windows

The Linux operating system uses its own file systems. Unlike Windows, for which the usual file systems are NTFS, FAT32, and exFAT, the popular file systems on Linux are ext4, ext3, and ext2.

If you connect a Linux drive to Windows, or if you have Linux installed as a second system, then Windows simply will not be able to open the contents of the ext4, ext3 and ext2 drives. It is possible to install additional drivers for EXT, but there is a much easier way.

If you need to view or copy files from Linux disks from Windows, then this instruction will help you.

Start by installing the 7-Zip program, as described in detail in the article “Free alternative to WinRAR”.

Easy way to open Linux drives (ext4, ext3 and ext2) in Windows

Open 7-Zip by entering “7-Zip” in the system-wide search and launch the program.

Now use the “Up” icon to go to the very top of the file system hierarchy until you see the “\\.” Symbol.

Click on “\\.” and you will be taken to the list of physical disks.

To figure out which drive you want, use their size or just navigate to each one to find a Linux drive.

An example of a Linux disk with two partitions: 0.img is the boot partition and 1.img is the main data partition.

An example of the contents of the 0.img section - it contains the files necessary for loading, namely UEFI.

It takes a certain amount of time to enter the section. A 100 GB partition took about a minute to parse the data and list the files, a 1 TB partition took less than three minutes to parse.

When “unpacking” is complete, a list of files in the root file system will be shown.

Navigating through files and even launching files, including large ones, is performed without delay.

You can navigate to any folder and open any file - Linux file and access restrictions do not work.

You can view absolutely any files, even those to which users usually never have access rights.

7-Zip allows you to open Linux partitions directly from Windows without installing additional drivers. You can view, save files and folders, but you cannot make changes to the file system. That is, you won't mess up anything on Linux disks.

See also another option how to copy files from a Linux disk in the article “How in Windows view the contents of a Linux disk and copy files from it”.

Official 7-Zip for Linux has been released

7-Zip is a free open source archiver that supports several archiving formats, including its own, which has better performance than other formats, and also supports almost all existing formats for decompression.

If you would like to know more about 7-Zip, then refer to the article “Free alternative to WinRAR”.

7-Zip was not officially released for Linux, but since the source code is open source, there is a program called p7zip, which is a console utility compiled from the 7-Zip source code. There are several graphical interfaces for this utility, such as q7z and j7z. Together, they allow you to get almost the same functionality on Linux as 7-Zip on Windows.

But it’s not that good. The p7zip version is stuck on 17.03 and has not been updated for a long time (at the time of writing, version 7-Zip is already 21.01). The graphical interfaces are also not updated frequently and are not free from bugs.

And finally, the official version of 7-Zip for Linux (console version) has been released. This is good news as Linux users will now get all the fresh features of 7-Zip. And, hopefully, the author will regularly release new versions along with updates to Windows versions.

For Linux, ARM architecture is also supported!

Official forum thread from the author: https://sourceforge.net/p/sevenzip/discussion/45797/thread/cec5e63147/

Links to archives with a compiled executable file:

Here's what the author himself writes about this issue:

It's first version of my port of 7-Zip to Linux. That port of 7-Zip is similar to p7zip, but it's not identical to p7zip. Also you can run the benchmark command to test that 7-Zip is working correctly. And it shows the performance of CPU:

./7zz b "-mm=*" "-mmt=*" -bt > bench.txt

Note that this benchmark command can work tens of minutes.

To install, download and unpack the archive:

wget https://7-zip.org/a/7z2101-linux-x64.tar.xz
tar -xf 7z2101-linux-x64.tar.xz
rm 7z*.tar.xz

The executable file name is 7zz:

./7zz

7zz Usage

Usage:

7zz <command> [...]  [...] [@listfile]

Options:

<Commands>
  a : Add files to archive
  b : Benchmark
  d : Delete files from archive
  e : Extract files from archive (without using directory names)
  h : Calculate hash values for files
  i : Show information about supported formats
  l : List contents of archive
  rn : Rename files in archive
  t : Test integrity of archive
  u : Update files to archive
  x : eXtract files with full paths

<Switches>
  -- : Stop switches and @listfile parsing
  -ai[r[-|0]]{@listfile|!wildcard} : Include archives
  -ax[r[-|0]]{@listfile|!wildcard} : eXclude archives
  -ao{a|s|t|u} : set Overwrite mode
  -an : disable archive_name field
  -bb[0-3] : set output log level
  -bd : disable progress indicator
  -bs{o|e|p}{0|1|2} : set output stream for output/error/progress line
  -bt : show execution time statistics
  -i[r[-|0]]{@listfile|!wildcard} : Include filenames
  -m{Parameters} : set compression Method
    -mmt[N] : set number of CPU threads
    -mx[N] : set compression level: -mx1 (fastest) ... -mx9 (ultra)
  -o{Directory} : set Output directory
  -p{Password} : set Password
  -r[-|0] : Recurse subdirectories
  -sa{a|e|s} : set Archive name mode
  -scc{UTF-8|WIN|DOS} : set charset for for console input/output
  -scs{UTF-8|UTF-16LE|UTF-16BE|WIN|DOS|{id}} : set charset for list files
  -scrc[CRC32|CRC64|SHA1|SHA256|*] : set hash function for x, e, h commands
  -sdel : delete files after compression
  -seml[.] : send archive by email
  -sfx[{name}] : Create SFX archive
  -si[{name}] : read data from stdin
  -slp : set Large Pages mode
  -slt : show technical information for l (List) command
  -snh : store hard links as links
  -snl : store symbolic links as links
  -sni : store NT security information
  -sns[-] : store NTFS alternate streams
  -so : write data to stdout
  -spd : disable wildcard matching for file names
  -spe : eliminate duplication of root folder for extract command
  -spf : use fully qualified file paths
  -ssc[-] : set sensitive case mode
  -sse : stop archive creating, if it can't open some input file
  -ssp : do not change Last Access Time of source files while archiving
  -ssw : compress shared files
  -stl : set archive timestamp from the most recently modified file
  -stm{HexMask} : set CPU thread affinity mask (hexadecimal number)
  -stx{Type} : exclude archive type
  -t{Type} : Set type of archive
  -u[-][p#][q#][r#][x#][y#][z#][!newArchiveName] : Update options
  -v{Size}[b|k|m|g] : Create volumes
  -w[{path}] : assign Work directory. Empty path means a temporary directory
  -x[r[-|0]]{@listfile|!wildcard} : eXclude filenames
  -y : assume Yes on all queries

Conclusion

So, most likely 7-Zip for Linux will be added to the official repositories. Perhaps this will also push the creation and updating of GUIs for 7-Zip on Linux.

Related materials:

Free alternative to WinRAR

Do I need an archiver now

Currently, the era of archivers has passed. Ten years ago, the archiver was one of the most important and one of the most frequently used programs because the Internet connection was slow and many files were compressed into archives. At modern data transfer rates, unpacking an archive may take longer than downloading a file. And therefore, archivers are often used simply as a way to collect many files into one, while the compression ratio is of little interest to anyone.

In addition, now out of the box Windows has a built-in archiver that allows you to create and unpack ZIP archives.

Nevertheless, the archiver continues to be a rather important program that is available on many computers - at least in order to open a downloaded or received archive.

The best archiver

In the old days, the most popular archiver was WinRAR - intuitive, with a good compression ratio, supporting many archives to decompress.

The only negative: WinRAR is and has always been paid. Downloading a cracked version can be infected with viruses.

By now, 7-Zip has evolved - it is a file archiver with a high compression ratio.

7-Zip is free and open source software. Most of the code is licensed under the GNU LGPL. Some parts of the code are licensed under the BSD three-clause license. There is also a limitation of the unRAR license for some parts of the code.

You can use 7-Zip on any computer, including a business computer. You don't need to register or pay for 7-Zip.

The main features of 7-Zip:

  • High compression ratio in 7z format with LZMA and LZMA2 compression
  • Supported formats:
  • Packing / unpacking: 7z, XZ, BZIP2, GZIP, TAR, ZIP and WIM
  • Unpacking only: AR, ARJ, CAB, CHM, CPIO, CramFS, DMG, EXT, FAT, GPT, HFS, IHEX, ISO, LZH, LZMA, MBR, MSI, NSIS, NTFS, QCOW2, RAR, RPM, SquashFS, UDF, UEFI, VDI, VHD, VMDK, WIM, XAR and Z.
  • For ZIP and GZIP formats, 7-Zip provides a compression ratio that is 2-10 % better than the ratio provided by PKZip and WinZip
  • Strong AES-256 encryption in 7z and ZIP formats
  • Self-extracting capability for 7z format
  • Integration with Windows Shell
  • Powerful File Manager
  • Powerful command line version
  • Plugin for FAR Manager
  • Localizations for 87 languages

7-Zip works in Windows 10 / 8 / 7 / Vista / XP / 2019 / 2016 / 2012 / 2008 / 2003 / 2000.

p7zip - the port of the command line version of 7-Zip to Linux/Posix. The official version of 7-Zip for Linux has also been released.

Compression ratio

We compared 7-Zip with WinRAR 5.20.

FILE SET: Mozilla Firefox 34.0.5 for Windows and Google Earth 6.2.2.6613 for Windows.

Archiver Mozilla Firefox Google Earth
65 files
85 280 391 bytes
483 files
110 700 519 bytes
Compressed size Ratio Compressed size Ratio
7-Zip 9.35
-mx
39 357 375 100% 15 964 369 100%
WinRAR 5.20
-m5 -s -ma5 -md128m
41 789 543 106% 17 035 432 107%

Compression ratio results are highly dependent on the data used for testing. Usually 7-Zip compresses to 7z format 30-70% better than zip format. And 7-Zip compresses to zip format 2-10% better than most other zip-compatible programs.

Download 7-Zip

The 7-Zip archiver takes up very little space and is completely free, so it will not be superfluous. Thanks to 7-Zip, you can open any archives, including those created in Linux, and you can also compress files into archives with a high compression ratio.

To download 7-Zip, go to the official website of the program: https://www.7-zip.org/

How to use 7-Zip

After installing the program, you will see the 7-Zip item in the context menu. Its content will be different depending on the selected file. If it is an archive, different unpacking options will be offered.

If you have selected one or more non-archive files, you will be prompted to compress them into an archive.

Related: How to select multiple inconsistent files and other tips for selecting files

The default settings is fine, it is not necessary to change anything, or you can specify the “Archive format” (optionally 7z, XZ, BZIP2, GZIP, TAR, ZIP and WIM), “Compression level” (from "No compression" (to simply combine several files in one) to “Ultra” (maximum compression ratio, but the slowest and most expensive in terms of RAM).

You can create a self-extracting archive (SFX archive), you can set a password for unpacking, encrypt filenames in a password-protected archive, and choose other settings.

To unpack the archive, also use the context menu or open the archive in 7-Zip.

7-Zip main window

In the main window of 7-Zip you can view the properties of archives and calculate their checksums.

You can also perform the usual actions for archives: extract, test for errors, add and delete files.

7-Zip settings

To open 7-Zip settings, go to Tools → Settings.

Here you can configure the association of archives with the 7-Zip program so that files with certain extensions can be opened with a double click.

You can customize the contents of the 7-Zip context menu.

You can also change the working folder (the folder where temporary files are saved), set programs for viewing, editing and comparing files, select other settings and change the language.

Conclusion

So, 7-Zip is at the same time very easy to use program, but at the same time very powerful, behind which there are years of development and many technologies.

Loading...
X