I want to achieve the following (simple) task, but I don't know how...
I have a zip file like this, only containing some folders
dummy.zip:
/my/dummy/folder/stucture
how can I add folders to this dummy.zip file that the newly added files and dirs are located under "/my/dummy/folder/stucture" using the command line (linux)?
dummy.zip should look like this afterwards:
/my/dummy/folder/stucture/my/new/Dirs
I've made a screenshot to better illustrate what I mean
The Create a Folder dialog will appear. The dialog shows the full path of the folder in the Zip file in which the new folder will be created. Enter the name of the new folder in the Name field and then click OK. Files can now be dragged from Windows Explorer and dropped into the new folder.
In Windows, once you've created a zip file you can then add more files to it by dragging them onto the zip file's icon.
To append "archive" to an existing zip file you could use option -r
:
zip -r9 dummy.zip dirs
You could crate your zip:
$ zip -9 dummy.zip file
And later you could add a full dir:
$ zip -r9 dummy.zip dirs
Or contents of the dir on the same root:
$ cd dirs
$ zip -r9 dummy.zip *
The -9
is the compression level, in this case, the maximum.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With