Zip (compress) an entire folder through SSH on Apache

// SSH

What it does

Compress a folder on your server ready for download through an SSH client.

Note: the -r is important here, as it will ensure the folder is zipped recursively with all files inside, and not just the folder itself.

The Code

zip -r folder-name-to-zip/

How To Use It

In an SSH client, such as PuTTY, login and navigate to the parent folder containing the folder you’d like to compress.

For example, if you’d like to zip folder-name-to-zip, which is located at , use the following command to navigate to the parent folder:

cd downloads