Thursday, November 17, 2011

Unzip 7zip file in Centos

Download a VMware appliance recently and copy it to my notebook for web browsing.  However, I am not sure how to extract it.  Search in Google and find the following steps (thegeekstuff).

Install p7zip package as shown below.
Install p7zip to unzip *.7z files on CentOS
# yum install p7zip

Uncompressing a *.7z 7zip files in Linux using 7za
$ 7za e myfiles.7z

7-Zip (A) 9.04 beta Copyright (c) 1999-2009 Igor Pavlov 2009-05-30
p7zip Version 9.04 (locale=C,Utf16=off,HugeFiles=on,1 CPU)

Processing archive: ../../myfiles.7z

Extracting myfiles/test1
Extracting myfiles/test2
Extracting myfiles/test
Extracting myfiles

Everything is Ok

Folders: 1
Files: 3
Size: 7880
Compressed: 404
7za – command name
e – specifies the 7z to be extracted
myfiles.7z – is the file that is to be extracted



Creating a 7zip compression file in Linux
$ 7za a myfiles.7z myfiles/

7-Zip (A) 9.04 beta Copyright (c) 1999-2009 Igor Pavlov 2009-05-30
p7zip Version 9.04 (locale=C,Utf16=off,HugeFiles=on,1 CPU)
Scanning

Creating archive myfiles.7z

Compressing myfiles/test1
Compressing myfiles/test2

Everything is Ok

No comments: