Skip to content
- SSH into your server
- Install
zip
and unzip.
- CentOS / Fedora / Red Hat:
yum install zip
and yum install unzip
- Debian / Ubuntu:
apt-get install zip
and apt-get install unzip
- Zip a file:
zip new-zip-file.zip file-to-zip
- Zip all files in directory:
zip new-zip-file.zip *
- Zip a directory:
zip -r new-zip-file.zip directory-to-zip
- Unzip to the current directory:
unzip file-to-unzip.zip
- Unzip to a specified directory:
unzip file-to-unzip.zip -d /directory-to-unzip-to
- List all files in the zip:
unzip -l file-to-unzip.zip