Mithilfe des Terminals kann man eine Datei oder einen Ordner «zippen» und mit einem Kennwort versehen:
Der Befehl für einen Ordner lautet:
zip -er ~/Desktop/ORDNERNAME.zip ~/Desktop/ORDNERNAME
(Falls es sich um einen Datei handelt einfach die Option -r weglassen)
zip - package and compress (archive) files
Encrypt 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.
Travel the directory structure recursively; for example:
zip -r foo.zip foo or more concisely zip -r foo foo In this case, all the files and directories in foo are saved in a zip archive named foo.zip, including files with names starting with ".", since the recursion does not use the shell's file-name substitution mechanism. If you wish to include only a specific subset of the files in directory foo and its subdirectories, use the -i option to specify the pattern of files to be included. You should not use -r with the name ".*", since that matches ".." which will attempt to zip up the parent directory (probably not what was intended). Multiple source directories are allowed as in zip -r foo foo1 foo2 which first zips up foo1 and then foo2, going down each directory. Note that while wildcards to -r are typically resolved while recursing down directories in the file system, any -R, -x, and -i wildcards are applied to internal archive path- names once the directories are scanned. To have wildcards apply to files in subdirecto- ries when recursing on Unix and similar systems where the shell does wildcard substitu- tion, either escape all wildcards or put all arguments with wildcards in quotes. This lets zip see the wildcards and match files in subdirectories using them as it recurses.