Skip to content

Tag: zip

How to zip multiple folders separately in linux

Below mentioned folders contain some data. I need to zip all the folders separately. With this Command, I can zip only one folder How can I zip all the folders separately at once? Answer First, make sure that you are in the directory where the above mentioned folders are. Then run: find . -type d -maxdepth 1 -execdir zip ‘{}.zip’

Looking to do a simple script for compressing and decompressing a file in linux

I need to take a 7z file and uncompress it, then recompress it with zip, and I’d like to do with this with a script, what’s something quick and basic I can use? It’s centos if that would make a difference. Answer Please refer to repack-7z-files-to-zip-files-in-linux: Personally I use the 7z command on Ubuntu (p7zip-full package) that supports both both

zipping all files specified in a text file and then deleting them

I’m trying to add each file, specified one per line, into a file named The directory structure of each file specified should remain as is. After the file listed in files.txt is added to it should be deleted, but never the directories. The structure of the text file is one file per line: I have files.txt in the

Is there a way to delete zip archive comments in python?

I have multiple zip archives all with a similar comment. Is there a way to delete the comment from the archives with python and use it over multiple archives with similar comment? What I have tried with single archive This is not working. Comment is not getting deleted in the archive, plus I want this to work on multiple archives

Zip command on Linux includes whole folder structure

I’m currently incorporating continuous integration on a project I’m working on at work using Bamboo. We are using ANT scripts to do the build automation, and as the final task we’re using the linux Zip command to create a release zip file. The problem is that the zip file contains the whole chain of folders leading up to the release

Zip Junk Paths Option Not Working

I have a bit of an odd one that I can’t seem to figure out. Here’s the setup. I am downloading a bunch of files given to a script via array. The files are not necessarily in the same folder, so I don’t think just using cd to change directory and then add the files I want is going to

Linux where does zip place the newly created zip file? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question

Compressing ZIP files in a linux server with PHP

I am trying to create a .zip file of a folder in linux. First I go where the compressed folder is: The folder test has the folder testzip which should be zipped and sent somewhere else: This should create Somehow this doesn’t work. Could anyone help? Answer Try with instead of — EDIT — Reading the comment of Mark

Remove folder structure (parents only) using ZIP command in PHP

I want to create a zip of all files in X folder with the name using following command in php like: exec(zip -r “./Zips/” “./Uploads/Data/X/”) but the created zip has the folder structure Uploads/Data/X. Please help me to get rid of these parent folders – Uploads/Data. Answer Ignoring folder structure when creating zip archive (Linux): By default, zip will