Quantcast
Channel: Command line zip everything within a directory, but do not include any directory as the root - Stack Overflow
Viewing all articles
Browse latest Browse all 5

Answer by silversurfer for Command line zip everything within a directory, but do not include any directory as the root

$
0
0

I found the easier way to make an encrypted zip file with the terminal app on mac (mac os) just from the files of your folder.

The command for the terminal

zip -j -e wishedname.zip yourfolder/*

That's it. Enjoy!

*

For more information to zip command in the terminal app

man zip

What -j and -e do?

-j--junk-pathsStore  just  the  name  of a saved file (junk the path), and do not store directory names. By default, zip will store the full path (relative to the current directory).-e--encryptEncrypt  the contents of the zip archive using a password which is entered on the terminal in response to a prompt (this will not be echoed; if standard error is not a tty, zip will  exit with an error).  The password prompt is repeated to save the user from typing errors.

Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>