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 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)
  • (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
  • (The name of the archive you are extracting)

One thought on “How to ZIP using SSH

Leave a Reply

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