6

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?

10

Simply…

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

  • 1
    Ill have you your +10 bonus. – CousinCocaine Jun 1 '15 at 7:53
-1

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

There is for copying: fileIntoZIP.

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

  • Where is the encryption in this? – Mark 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 .