Neither the zip nor the unzip utilities are included in the default install of Linux. To install them from shell prompt, you must be a root user and type following two commands to install zip and unzip program.
If you are using RedHat / CentOS / Fedora then enter
# yum install zip unzip
If you are using Ubuntu / Debian then enter
# apt-get install zip unzip
zip examples
Creates the archive data.zip and puts all the files in the current directory in it in compressed form, type the following command
$ zip data *
To zip up an entire directory, type the following command
$ zip -r data *
To put the zip archive in the directory /tmp and copying over data.zip to the current directory, enter
$ zip -b /tmp data *
unzip examples
To use unzip to extract all files of the archive pics.zip into the current directory, enter
$ unzip data.zip
To extract all files into the /tmp directory, enter
$ unzip data.zip -d /tmp
To list all files from data.zip, enter
$ unzip -l data.zip
Related Posts:
- How To Setup A LAMP Server On Centos 6.0
- Install RPM File On CentOS / RedHat
- How To Install Subversion (SVN) Extension Working With PHP 5.3
- How To Setup Iptables Firewall For A Web Server On CentOS
- How Do I Fix “Host is blocked because of many connection error” In MySQL
- How To Start / Shutdown / Reboot Guest Operating Systems With virsh Command On KVM
- Repel port flood by CSF and IPT_Recent
- What is the role of this variables in php.ini file (expose_php – allow_url_fopen – register_globals) ?
- How Do I Block An IP Address On Linux Server ?
- How To Flush The Entire Contents Of Memcache Server