Менеджер архивов linux arch

Менеджер архивов linux arch

WinRAR is an archive manager. It can backup your data and reduce the size of email attachments, open and unpack RAR, ZIP and other files downloaded from Internet, create new archives in RAR and ZIP file format. A trial version is available, so you can try WinRAR before buying.

Key features

  • Variable amounts of redundancy («recovery record» or «recovery volumes» both of which are demonstrated below) can be added to an archive, making it more resistant to corruption. Even if parts of an archive are damaged, it is possible to fully recover the stored data if a large enough recovery record exists. On its own, Tar does not have this ability.
  • RAR is able to efficiently handle split volumes. Built-in support for multi-volume files enables the unpacking program to simply prompt the user for the next .partXXX RAR file, without the need to manually copy and then rejoin the pieces, or for extracting a file from a single piece without needing all pieces. RAR does not support tapes, as it uses seek and rename operations on its files.
  • RAR archives can be of a solid format, in which all of the compressed files are treated as a single data block. Most currently used compression formats (with the exception of the older ZIP) allow solid structuring.
  • Strong encryption capabilities. Older versions of the file format used a proprietary algorithm; newer versions use the AES encryption algorithm, a block cipher adopted as an encryption standard by the U.S. government. The only known ways to recover an encrypted file are via dictionary or brute force attacks. In newer versions, password protection can optionally protect filenames too, so that the filenames contained within the archive will not be displayed without the right password.

Installation

Install the rar AUR package for both RAR and UnRAR. Alternatively, install unrar for just UnRAR.

Configuration file

RAR for Linux reads configuration information from the file ~/.rarrc (i.e. in the user’s home directory) or if you wish to define a global set of options for all users, in the /etc directory.

The syntax of the file is simply the following string:

switches=any_RAR_switches_separated_by_spaces 
switches=-m5 -rr5p -ol -s -md64 -msmp3;mp4;avi;mkv;zip;7z;rar;tar;gz;bzip2;zst;jpg;jpeg;gif

For a complete listing and explanation of rar‘s switches, see rar(1) .

Читайте также:  Plex media server линукс

RAR compression examples

General syntax

$ rar command -switch 1 -switch N archive files.rar @listfiles. 

For a complete listing of commands and switches, see the last section of this article or simply run rar .

Recursively compress an entire directory structure

$ rar a -r -rr10p /media/data/darkhorse-backup.rar /home/darkhorse

Mixed-mode archives

You can also use mixed-mode archives which means that file types you specifiy do not get compressed — they simply get stored.

$ rar a -r -rr10p -s -m5 -msjpg;mp3;tar /media/data/darkhorse-backup.rar /home/darkhorse

Recursively compress many directory structures using a list

First create a list (simple text file) containing the various targets. In this example, the list will be three lines long. I named it ‘home-list’ in this example but you can call it anything you want:

/home/darkhorse /home/palomino /home/seabiscuit
$ rar a -r -rr10p -s /media/data/homes-backup.rar @/path/to/home-list

UnRAR examples

General syntax

$ unrar command -switch 1 -switch N archive files. @listfiles. path_to_extract\ 

For a complete listing of commands and switches simply run:

To extract into a new folder:

$ unrar x /media/data/homes-backup.rar homes-backup/

For multi-part rar files, run:

$ unrar x homes-backup.part1.rar homes-backup/

Источник

Archiving and compression

The traditional Unix archiving and compression tools are separated according to the Unix philosophy:

  • A file archiver combines several files into one archive file, e.g. tar.
  • A compression tool compresses and decompresses data, e.g. gzip.

These tools are often used in sequence by firstly creating an archive file and then compressing it.

Of course there are also tools that do both, which tend to additionally offer encryption, error detection and recovery.

Archiving only

Name Package Manuals Description
GNU tar tar tar(1) , info Core utility for manipulating the ubiquitous tar archives (tarballs), which are used by pacman and the AUR.
libarchive libarchive bsdtar(1)
bsdcpio(1)
Implementation of tar and cpio that also offers a library. Used by pacman and mkinitcpio.
ar binutils ar(1) Legacy Unix archiver before tar. Today only used for creating static library files.
cpio cpio cpio(1) File archiver via stdin/stdout, supports cpio and tar formats.
DAR dar AUR dar(1) Archiver to backup large live filesystems, takes care of hard links, extended attributes, sparse files and inode types.

Tip: Both GNU and BSD tar automatically do decompression delegation for bzip2, compress, gzip, lzip, lzma, lzop, zstd, and xz compressed archives. Only BSD tar supports lz4 natively (but GNU tar can do an equivalent with —use-compress-program=lz4 / -Ilz4 ). When creating archives both support the -a switch to automatically filter the created archive through the right compression program based on the file extension. While BSD tar recognizes compression formats based on the format, GNU tar only guesses based on the file extension.

Compression tools

Compression only

These compression programs implement their own file format.

Archiving and compression

Name Packages Manuals Ext Description
p7zip p7zip 7z(1) .7z The third-party POSIX port of 7-zip’s command-line.
7-Zip 7-zip AUR , 7-zip-full AUR The upstream Linux version of a file archiver with a high compression ratio.
RAR rar AUR , unrar rar(1) .rar Both the format and the rar utility are proprietary.
t2sz t2sz AUR .tar.zst .tzst Tar archiving utility in C with member-aligned zstd-compression
tarlz tarlz AUR tarlz(1) .tar.lz .tlz Tar archiving utility in C++ with member-aligned lzip compression
ZIP zip , unzip zip(1) , unzip(1) .zip Widely used outside of the Linux world.
Unarchiver unarchiver unar(1) , lsar(1) many Command-line tool of a Mac application, supports over 40 archive formats.
ZPAQ zpaq AUR zpaq(1) .zpaq A high compression ratio archiver written in C++, uses several algorithms.
LHa lhasa , lha AUR lha(1) .lzh (on Amiga: .lha) LZH/LHA archiver, supports the lh7-method.
WinAce unace unace(1) .ace Both the ACE file format and the archiving tool are proprietary.
Читайте также:  Linux executable on windows

Feature charts

Some of the tools above are capable of handling multiple formats, allowing for fewer installed packages.

Decompress

Usage comparison

Archiving only usage

Name Create archive Extract archive List content
tar(1) tar cfv archive.tar file1 file2 tar xfv archive.tar tar -tvf archive.tar
cpio(1) ls file1 file2 | cpio -o > archive.cpio cpio -i -vd < archive.cpio cpio -t < archive.cpio

Compression only usage

Name Compress Decompress Decompress to stdout
bzip2(1) bzip2 file bzip2 -d file.bz2 bzcat file.bz2
gzip(1) gzip file gzip -d file.gz zcat file.gz
lrzip(1) lrzip file
lrztar folder
lrzip -d file.lrz
lrztar -d folder.tar.lrz
lrzcat file.lrz
xz(1) xz file xz -d file.xz xzcat file.xz

Archiving and compression usage

Name Compress Decompress Decompress to stdout List content
7z(1) 7z a archive.7z file1 file2 7z x archive.7z 7z e -so archive.7z file1 7z l archive.7z
rar(1) rar a archive.rar file1 file2 rar x archive.rar rar p -inul archive.rar file1 rar l archive.rar
zip(1) , unzip(1) zip archive.zip file1 file2 unzip archive.zip unzip -p archive.zip file1 unzip -l archive.zip
lha(1) lha ao7 archive.lzh file1 file2 lha x archive.lzh minimal: lha l archive.lzh verbose: lha v archive.lzh

Convenience tools

  • atool — Script for managing file archives of various types.
  • dtrx — An intelligent archive extraction tool.
  • J7Z — GUI for Linux in java which attempts to simplify data compression and backup. It can create 7z, BZip2, Zip, GZip, Tar archives.
  • unp — Command line tool that can unpack archives easily.
  • unpack — Wrapper script for handling multiple archive formats.
  • zutils — A drop-in replacement of zcat(1) / zgrep(1) / zdiff(1) in C++ to decompress gz/bz2/xz/lzip/zstd file transparently like bsdcat(1) but using user-defined utilities, usually used in combination with parallel variants of common (de)compressor like pixz(1) .
  • Bash/Functions#Extract

Determining archive format

To extract an archive, its file format needs to be determined. If the file is properly named you can deduce its format from the file extension.

Otherwise you can use the file tool, see file(1) .

Esoteric, rare or deprecated tools

Name Packages Ext Description
ARC arc AUR .arc, .ark Was very popular during the early days of the dial-up BBS. Superseded by ZIP.
ARJ arj .arj An archiver used on DOS/Windows in mid-1990s. This is an open source clone.
compress ncompress .Z The de facto standard UNIX compression utility to success the Huffman-based pack(1) before gzip become a thing.
PAR2 par2cmdline .par2 Parity archiver for increased data integrity. See also Parchive.
shar sharutils .shar Creates self-extracting archives that are valid shell scripts.
Zoo zoo AUR .zoo Was mostly popular on the OpenVMS operating system before PKZIP became popular.
Читайте также:  Linux x64 or linux x64 rpm

File system compression

Some file systems support on-the-fly compression of file data:

  • Btrfs can be configured to compress individual files, directories, or entire volumes by default.
  • On ZFS, compression can be enabled on pools or file systems.

Device mapper compression

There is work being done to mainline (integrate into the Linux kernel project) the open-sourced VDO project, which provides a deduplication and compression device mapper layer in the interest of increasing storage efficiency. The following packages are available:

  • vdo — Userspace tools for managing VDO volumes
  • kvdo — A pair of kernel modules which provide pools of deduplicated and/or compressed block storage

Compression libraries

  • Brotli — Compression algorithm for data streams using the LZ77 algorithm, Huffman coding and 2nd order context modeling.
  • libzip — Provides creation and extraction of ZIP files. Used by KDE and Deepin in place of the zip/unzip tools.
  • zlib — Compression library implementing the deflate compression method found in gzip and PKZIP.
  • Zopfli — High compress ratio file compressor from Google, using a deflate-compatible algorithm called zopfli.

Troubleshooting

Garbled Japanese Filenames

Japanese versions of Windows encode ZIP archives with Shift-JIS. By default, these archives will suffer from mojibake filenames when extracted. To extract properly, use unzip in the command-line using the shift-jis option.

$ unzip -O shift-jis nihongo.zip

See also

Источник

Менеджер архивов linux arch

To extract packages on archlinux, by default you can use command line like tar. But there’s another easy way using file manager. But you must install required packages first.

For extracting zip files you need install zip & unzip
For extracting rar files you need install unrar
Software like winrar/winzip, you can try xarchiver, or file-roller from AUR.

Install these packages first:

Done. Then you can extract/unzip or compress into archive on file manager.

Extracting
Compress

For GUI like winrar/winzip there are 2 apps installed fileroller and 7zip, both of them look OK, but File-Roller is better GUI and simple.

Another best archiver is xarchiver

Download the tarball file, then extract it using tar -xvzf xarchiver.tar.gz
Then makepkg -s, after package created install it using sudo pacman -U *.pkg.tar.xz

Here’s the GUI of xarchiver:

Ok, that’s it, about three software above, i prefered file-roller, then xarchiver, and the last 7zip FM.

Источник

Оцените статью
Adblock
detector