Question

How to create zip of a directory in spaces?

As I am trying to create a zip of a directory with multiple sub folders and I want to provide it for users to download. But i am unable to do that. Can anyone help me out how to zip a directory in spaces. I can easily do it from my local storage.


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

KFSys
Site Moderator
Site Moderator badge
October 21, 2022

Hi @mohamamdashraf-ali,

There have been similar questions asked in the community as well, here is one that I found a few days back:

https://www.digitalocean.com/community/questions/how-to-zip-files-in-the-spaces-bucket

This could be useful as well as the link provided you earlier by Rexford Nkansah.

Hi Mohamamd,

From my understanding, that’s not a trivial task to do, since on spaces, the files or objects with paths, and not necessarily directories.

You can find more info on the potential workarounds in this answer: https://stackoverflow.com/questions/16368119/zip-an-entire-directory-on-s3

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel
Get started for free

Enter your email to get $200 in credit for your first 60 days with DigitalOcean.

New accounts only. By submitting your email you agree to our Privacy Policy.

© 2023 DigitalOcean, LLC.