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 Answer
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.