Introduction
Zip is the most used file compressor in windows operating system, it is a pre-installed application that is avalaible when we installed the windows operating system on PC. Basically, most of linux operating system like ubuntu, debian RedHat etc. doesn't make "Zip" as a pre installed packages in the system. So, if linux user wanted to unzip a "zip" file, he need to install "unzip" package before he can unzip file.
How to Install Unzip and File Roller in Linux Command Line (Terminal)
here is an example how to install unzip packages from linux command, you need to run this command:
sudo apt-get install unzip file-roller
The command bellow can be used by debian or ubuntu OS's user. package "file-roller" is a GUI interface of unzip application so i include it, to make it easier for GUI user. Here is the result from the command bellow:
sudo apt-get install unzip
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
audacious audacious-plugins audacious-plugins-data galculator gtk2-engines
gtk3-engines-unico libaudcore2 libbinio1ldbl libcddb2 libcue1 libfluidsynth1
libguess1 libmms0 libmodplug1 libsidplayfp3 lubuntu-artwork
lubuntu-artwork-15-04 lubuntu-default-settings lubuntu-icon-theme
lubuntu-lxpanel-icons lxsession-data lxsession-logout
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
unzip
0 upgraded, 1 newly installed, 0 to remove and 71 not upgraded.
Need to get 159 kB of archives.
After this operation, 400 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
unzip
Install these packages without verification? [y/N] y
Get:1 http://id.archive.ubuntu.com/ubuntu/ vivid-updates/main unzip amd64 6.0-13ubuntu3.2 [159 kB]
Fetched 159 kB in 7s (22,6 kB/s)
Selecting previously unselected package unzip.
(Reading database ... 211219 files and directories currently installed.)
Preparing to unpack .../unzip_6.0-13ubuntu3.2_amd64.deb ...
Unpacking unzip (6.0-13ubuntu3.2) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for mime-support (3.58ubuntu1) ...
Setting up unzip (6.0-13ubuntu3.2) ...
How to Unzip a File in Linux
Now it comes the time to unzip a file, for example i have a zip file named "test.zip", inside "/home/user/Documents/test" directory. so i need to enter to that directory first by using this command :
cd ~/Documents/test
and now i want to know does the zip file is exist, so i used this command :
ls
and here is the result:
elbirtus@asus:~/Documents/test$ ls
test.zip
to unzip "test.zip" file we can used this command:
unzip test.zip
here is the result:
elbirtus@asus:~/Documents/test$ unzip test.zip
Archive: test.zip
extracting: test.txt
now lets take a look, does a new file just extracted from the zip file, use this command:
ls
and here is the result :
elbirtus@asus:~/Documents/test$ ls
test.txt test.zip
Based on the result, we just successfully extracted the zip file, a new file that is just extracted from the zip file named "test.txt".
Komentar
Posting Komentar