7-zip is toted to have a higher compression ratio than the regular zip archives. The 7-zip compressed files usually have a .7z extension
, but lets check with 'file' command to find what kind of file it is.
$ file archive.7z
archive.7z: 7-zip archive data, version 0.2
( For this tutorial I created a 7-zip compressed archive (archive.7z) with few blank files beforehand.)
Alright now lets find out what packages in GNU/Debian Sid provide tools to handle 7-zip files.
$apt-cache search 7-zip
advancecomp - collection of recompression utilities
krusader - twin-panel (commander-style) file manager for KDE (and other desktops)
lzma - Default and general compression method of 7z format in 7-Zip program
p7zip - 7zr file archiver with high compression ratio
p7zip-full - 7z and 7za file archivers with high compression ratio
p7zip-rar - non-free rar module for p7zip
Hmm, Lets go with "p7zip" package and install it.
$ apt-get install p7zip
The "p7zip" package provides /usr/bin/7zr program which I here use to list (l) and extract (x) our archive file.
Listing with "l" parameter shows the contents of the archive.
$ 7zr l archive.7z
7-Zip (A) 4.55 beta Copyright (c) 1999-2007 Igor Pavlov 2007-09-05
p7zip Version 4.55 (locale=C,Utf16=off,HugeFiles=on,1 CPU)
Listing archive: archive.7z
Solid = -
Blocks = 0
Date Time Attr Size Compressed Name
------------------- ----- ------------ ------------ ------------------------
2007-09-27 16:18:37 ....A 0 0 bar1
2007-09-27 16:18:58 ....A 0 0 bar2
2007-09-27 16:18:58 ....A 0 0 bar3
2007-09-27 16:18:58 ....A 0 0 bar4
------------------- ----- ------------ ------------ ------------------------
0 0 4 files, 0 folders
Lets extract the files in the archive with "x" option. This uncompress the files to the current directory.
$ 7zr x archive.7z
7-Zip (A) 4.55 beta Copyright (c) 1999-2007 Igor Pavlov 2007-09-05
p7zip Version 4.55 (locale=C,Utf16=off,HugeFiles=on,1 CPU)
Processing archive: archive.7z
Extracting bar1
Extracting bar2
Extracting bar3
Extracting bar4
Everything is Ok
Total:
Folders: 0
Files: 4
Size: 0
Compressed: 130
hey pls can u tell me how to open a 72 file easy pls coz i dont understand nothing that u said upthere pls tell me
ReplyDeletesorry i mean 7z pls tell me
ReplyDeleteJust download 7zip, the archive program is free, however if you have win-zip, or just about any other zip archive program it will open a 7zip file. The beauty of 7zip, not including the fact that it is free, is that, generally, it's compression ratio is greater than many and is, therefore, more efficient
DeleteThanks a lot for this article as it helped me extract file with 7z in ubuntu 9.04. Please continue this good work
ReplyDeleteRegards
Bala