views:

37

answers:

1

Wow I feel silly asking this question but here goes.

I'm creating a zip file by relatively specifying file locations. Here is an example of the command I'm running:

zip priv/purchases/test.zip priv/audio/5001.mp3 priv/audio/5002.mp3

When the file compresses it maintains the relative paths of the files. Thus I get a file hierarchy of:

/priv
    /audio
       /5001.mp3
       /5002.mp3

I've read the man page and I guess I should be using the -j flag. Instead I'd like the files to be extracted at the root of the uncompressed file.

-j seems to work but it ALSO includes the file structure. What the hell!

A: 

Well don't I feel silly. Apparetly if you don't remove the previous directory it seems to append the files. Shoot! Haha.

David