Linux also has corresponding methods to decompress the compressed files .zipand .rar in Windows:
1)for. Zip
Linux provides zip and unzip programs, Zip is a compression program, and unzip is a decompression program. They have many Parameter options, which can be viewed by the command zip-help and unzip-help. Here we will only give a brief introduction and give an example to illustrate their usage:
# Zip yajiu.zip yajiu.jpg yajiu.png
This command compresses yajiu.jpgand yajiu.png into a zip package
# Zip yajiu.zip *. jpg
This command compresses all .jpg files into a zip package.
# Zip-r yajiu.zip yajiu
This command compresses the folder yajiu into a zip package
# Unzip yajiu.zip
This command decompress all the files in yajiu.zip.
Yajiu @ yajiu-desktop :~ $ CD image
Yajiu @ yajiu-desktop :~ /Image zip yajiu.zip yajiu.jpg yajiu.png
Updating: yajiu.jpg (deflated 34%)
Updating: yajiu.png (deflated 0%)
Yajiu @ yajiu-desktop :~ /Image $ zip yajiu.zip *. jpg
Adding: 1.jpg (deflated 34%)
Adding: 2.jpg (deflated 0%)
Yajiu @ yajiu-desktop :~ /Image $ zip-r yajiu.zip yajiu
Adding: yajiu/(stored 0%)
Adding: yajiu/yajiu.zip (stored 0%)
Adding: yajiu/yajiu.jpg (deflated 34%)
Adding: yajiu/yajiu.rar (deflated 0%)
Adding: yajiu/yajiu.7z (deflated 0%)
Adding: yajiu/yajiu.png (deflated 0%)
Yajiu @ yajiu-desktop :~ /Image $ unzip yajiu.zip
Archive: yajiu.zip
Replace 1.jpg? [Y] es, [N] o, [a] ll, [N] One, [R] ename: Y
Inflating: 1.jpg
Replace 2.jpg? [Y] es, [N] o, [a] ll, [N] One, [R] ename: Y
Inflating: 2.jpg
Yajiu @ yajiu-desktop :~ /Image $
2XX vs. .rar
Install: sudo apt-Get install RAR unrar
You can also download RAR for Linux compilation and installation from http://www.rarsoft.com/download.htm.
# Tar-xzpvf rarlinux-3.8.0.tar.gz
# Cd RAR
# Make
In this way, after the installation, there will be the RAR and unrar programs, rar is the compression program, and unrar is the decompression program. They have many Parameter options, which can be viewed by commands rar-help and unrar-help. Here, we also give a simple example to illustrate their usage:
# Rar a yajiu.rar yajiu.jpg yajiu.png
This command compresses yajiu.jpgand yajiu.png into a RAR package
# Rar a yajiu.rar *. jpg
This command compresses all .jpg files into a RAR package
# Rar a yajiu.rar yajiu
This command compresses the folder yajiu into a RAR package
# Unrar e yajiu.rar
This command is to extract all the files in yajiu.rar
Yajiu @ yajiu-desktop :~ $ CD image
Yajiu @ yajiu-desktop :~ /Image $ rar a yajiu.rar yajiu.jpg yajiu.png
RAR 3.80 beta 2 copyright (c) 1993-2008 Alexander roshal 16 Jun 2008
Shareware version type rar -? For help
Evaluation copy. Please register.
Creating archive yajiu.rar
Adding yajiu.jpg OK
Adding yajiu.png OK
Done
Yajiu @ yajiu-desktop :~ /Image $ rar a yajiu.rar *. jpg
RAR 3.80 beta 2 copyright (c) 1993-2008 Alexander roshal 16 Jun 2008
Shareware version type rar -? For help
Evaluation copy. Please register.
Creating archive yajiu.rar
Adding 1.jpg OK
Adding 2.jpg OK
Done
Yajiu @ yajiu-desktop :~ /Image $ rar a yajiu.rar yajiu
RAR 3.80 beta 2 copyright (c) 1993-2008 Alexander roshal 16 Jun 2008
Shareware version type rar -? For help
Evaluation copy. Please register.
Creating archive yajiu.rar
Adding yajiu/yajiu.zip OK
Adding yajiu/yajiu.jpg OK
Adding yajiu/yajiu.rar OK
Adding yajiu/yajiu.7z OK
Adding yajiu/yajiu.png OK
Adding yajiu OK
Done
Yajiu @ yajiu-desktop :~ /Image $ unrar e yajiu.rar
Unrar 3.80 beta 2 freeware copyright (c) 1993-2008 Alexander roshal
Extracting from yajiu.rar
1. jpg already exists. Overwrite it?
[Y] es, [N] o, [a] ll, N [e] ver, [R] ename, [Q] uit y
Extracting 1.jpg OK
7a008fc287fe680c0ff477e9.jpg already exists. Overwrite it?
[Y] es, [N] o, [a] ll, N [e] ver, [R] ename, [Q] uit y
Extracting 2.jpg OK
All OK
Yajiu @ yajiu-desktop :~ /Image $