Zip a folder in Linux

So today when I was taking backup of files without using cPanel, I tried my hands at creating a zip archive using SSH Prompt.

But I was stuck, because when I used the comand,

zip *

It compressed all the files in the directory, but all the contents of the folders were not included in the zip archive at all.

So I checked around the web and found that,

The command for compressing a folder and creating a zip archive, in Linux is :

zip -9 -r blog

Where is the name of the newly created archive file,

blog is the name of the folder I wanted to compress.

I downloaded the file using FTP client, but if you place it in your public_html folder then you can download it directly from web browser, by using the URL

Hope this proves to be useful for others searching for the same.

This entry was posted in Linux.

Leave a Reply

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