Square BlogInsight, news and reviews

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)

1 Comment

  1. Parth
    October 18, 2012

    Thank you!

Drop a comment

Your email address will not be published. Required fields are marked *