How to Zip and Unzip Files in Linux RHEL 6/CentOS 6

Related Articles

zip is a compression and file packaging utility for Unix, VMS, MSDOS, OS/2, Windows, Macintosh and linux operating systems. Meanwhile, unzip is utility to extract compressed files from a ZIP archive. In this post, i will show the simple steps on how to zip and unzip the file in Red Hat Linux Enterprise 6 (RHEL 6). This steps may also working on other versions such as CentOS 5.1, CentOS 5.2, CentOS 5.3, CentOS 5.4, CentOS 5.5, CentOS 5.6, CentOS 5.7, CentOS 6.x, RHEL 5.x and RHEL 6.x.

1. Creates the archive folder1.zip and puts all the files in the current directory in it in compressed form as below :

[root@rhel6 ~]# touch file1
[root@rhel6 ~]# touch file2
[root@rhel6 ~]# touch file3
[root@rhel6 ~]# ls
file1  file2  file3
[root@rhel6 ~]# zip folder1 *
  adding: file1 (stored 0%)
  adding: file2 (stored 0%)
  adding: file3 (stored 0%)
[root@rhel6 ~]# ls
file1  file2  file3  folder1.zip

2. To unzip Joomla_2.5.3-Stable-Full_Package.zip into /var/www/html/joomla253 folder :

[root@rhel6 ~]# unzip Joomla_2.5.3-Stable-Full_Package.zip -d /var/www/html/joomla253
As always if you need any help you can reach us on twitter @ehowstuff or drop us a comment below. Jumping through archives page to read more articles..


Skytech is a part time blogger that has over 6 years experience in servicing, repairing and configuring computers and administering the server systems.

Related Articles

Powered by WordPress · Designed by Theme Junkie