Say I want to add the file
foo.zip, I could just do
zip -u foo.zip file.txt.
However inside the zip-file there already exist a folder with the path
foo.zip/very/many/paths/ (relatively to the zip-file).
How would I add
file.txt to the zip-file so it's location inside the zip-file would be
I could create the directory structure needed first, but isn't there an easier way?
I would normally do it like this:
$ ls file.txt foo.zip $ mkdir very $ mkdir very/many $ mkdir very/many/paths $ cp file.txt very/many/paths $ zip -u foo.zip very/many/paths/file.txt $ rm -rf very