Jul 252013

How to ZIP using SSH

To ZIP a folder via SSH (Secure Shell) log in to your server and at the command line type:

# zip -r myarchive.zip myfolder

This will create a ZIP archive of all files and sub directories

-r (This tells the server to include all files and sub directories)

archive.zip (The name of the zip file you want to create)
myfolder (The folder name you are targetting or use * if you are currently in the folder.)
To UNZIP an archive type:

# unzip myarchive.zip

myarchive.zip (The name of the archive you are extracting)