Jump to Navigation

229 - 7zip

7-Zip is an amazing compression program. Compression ratio results are very dependent upon the data used for the tests. Usually,
7-Zip compresses to 7z format 30-70% better than to zip format. And 7-Zip compresses to zip format 2-10% better than most of
other zip compatible programs.

1. You can search rpm if you want

 URL- http://rpm.pbone.net/

2. Copy the link and use it to rpm comand with "-ivh"

# rpm -ivh ftp://ftp.sunet.se/pub/Linux/distributions/fedora/epel/epel/testing/5/x8...

# rpm -ivh ftp://ftp.sunet.se/pub/Linux/distributions/fedora/epel/epel/testing/5/x8...

3. Grammar of command

The first part "command" is the main verb. Then you specify optional switches, the archive name (either source or destination archives) and then files.

Usage: 7za or 7z <command> [<switches>...] <archive_name> [<file_names>...]

< Commands >
  a: Add files to archive
  b: Benchmark
  d: Delete files from archive
  e: Extract files from archive (without using directory names)
  l: List contents of archive
  t: Test integrity of archive
  u: Update files to archive
  x: eXtract files with full paths
< Switches >
  -ai[r[-|0]]{@listfile|!wildcard}: Include archives
  -ax[r[-|0]]{@listfile|!wildcard}: eXclude archives
  -bd: Disable percentage indicator
  -i[r[-|0]]{@listfile|!wildcard}: Include filenames
  -m{Parameters}: set compression Method
  -o{Directory}: set Output directory
  -p{Password}: set Password
  -r[-|0]: Recurse subdirectories
  -scs{UTF-8 | WIN | DOS}: set charset for list files
  -sfx[{name}]: Create SFX archive
  -si[{name}]: read data from stdin
  -slt: show technical information for l (List) command
  -so: write data to stdout
  -ssc[-]: set sensitive case mode
  -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

# 7z a -t7z archive.7z *.txt

7z:         name of executable
a:          archive command specified
-t7z:       use 7z file type (less compatible and smaller results)
archive.7z: destination archive file
*.exe:      include all *.txt files in directory in new archive


# 7z e archive.zip

7z:          executable
e:           use extract command
archive.zip: source archive you want to expand

< Example -t type switches >

Type switch:      -t7z
Format:           7Z
Example filename: archive.7z (default option)

Type switch:      -tgzip
Format:           GZIP
Example filename: archive.gzip

Type switch:      -tzip
Format:           ZIP
Example filename: archive.zip (very compatible)

Type switch:      -tbzip2
Format:           BZIP2
Example filename: archive.bzip2

Type switch:      -ttar
Format:           TAR
Example filename: tarball.tar (UNIX and Linux)

Type switch:      -tiso
Format:           ISO
Example filename: image.iso

Type switch:      -tudf
Format:           UDF
Example filename: disk.udf



Main menu 2

Story | by Dr. Radut