1

I have a folder that i want to zip but not deflate the soundfiles (since i'll create an expansion file for android).

TO achieve that one can use the -n flag. that is

zip -n .mp3 main_expansion thaisounds

then a new zip-folder is created where the mp3-soundfiles are stored but not deflated.

The problem is that I also have two other sounfile-format there

.wav
.3ga

If I add those as follows

 zip -n .mp3,.wav,.3ga main_expansion thaisounds

Then the program starts to deflate all files though I use the -n flag.

So - my question - How should I use the zip-command to not deflating the mediafiles when there are several formats?

1

According to my version of the zip man-page, you need to use colons to separate the suffixes:

   -n suffixes
   --suffixes suffixes
          Do not attempt to compress files named with the given suffixes.  Such files are simply stored (0% compres-
          sion) in the output zip file, so that zip doesn’t waste its time trying to compress  them.   The  suffixes
          are separated by either colons or semicolons.  For example:

                 zip -rn .Z:.zip:.tiff:.gif:.snd  foo foo

So you'd end up with:

zip -n .mp3:.wav:.3ga main_expansion thaisounds
  • Thanks at devoloper.android developer.android.com/google/play/expansion-files.html further down they give an example of this but uses semicolon - which wont work at all. :-) – Björn Hallström Nov 9 '15 at 18:52
  • for want of a shift, the command was lost... – Jeff Schaller Nov 9 '15 at 18:57
  • Any ideas of how to zip all content (without deflating) so I don't have to list all the suffixes (extensions i.e .mp3:.Wav .....)? The problem now is that one of the wav-files for some reason doesnt have an extension so its deflated. thanks in advance – Björn Hallström Nov 9 '15 at 19:47
  • 1
    zip -0 indicates "no compression"; maybe that'll do it? – Jeff Schaller Nov 9 '15 at 20:21
  • 1
    thanks - that solved the problem - I am relatively new to linux so I have to be better studying man-pages :-) – Björn Hallström Nov 9 '15 at 20:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.