2

My folder structure is:

folder1
folder2
folder3
zipFolder

How can I create a zip archive that consists of folder1, folder2, folder3 situated in zipFolder?

1

1 Answer 1

4

Use zip command recursively as following.

zip -r /path/to/zipFolder/zip_name /path/to/folder{1..3}

Or using tar command.

tar -czf zip_name.tar.gz -C /path/to/zipFolder/ /path/to/folder{1..3}

Note that with -z we are using gzip to compression.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .