It is possible to zip a target folder with encryption by the terminal command

zip -er ~/Desktop/myzippedfolder.zip ~/Documents/myfolder/

However, the contents of myzippedfolder will be a folder called Users containing a folder called username containing a folder called Documents containing the folder myfolder and its contents.

Is it possible to zip the folder myfolder only such that when myzippedfolder is unzipped it contains only myfolder and its contents rather than the parent folders?



cd to the correct directory first. For Example:

cd ~/Desktop

or alternatively, type cd [space], then drag your folder to terminal to auto-fill the path

| improve this answer | |
  • 1
    Ill have you your +10 bonus. – CousinCocaine Jun 1 '15 at 7:53

zip ~/Desktop/myzippedfolder.zip --out ~/Desktop/myfolder/ -s 1m

There is for copying: fileIntoZIP.

| improve this answer | |
  • Where is the encryption in this? – mmmmmm Jul 8 '15 at 12:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .