Neither the tar
format nor the gz
format has built-in support for password-protecting files.
The Windows zip
format combines several different piece of functionality: compression (e.g. gzip), archiving multiple files into one (e.g. tar), encryption (e.g. gnupg), and probably others. Unix tends to have individual tools, each of which does one thing well, and lets you combine them.
The Unix equivalent of a password-protected .zip
file would probably be called something like foo.tar.gz.gpg
or foo.tgz.gpg
.
And there are open-source zip
and unzip
tools for Unix, though they may not provide all the capabilities of the Windows versions (I'm fairly sure the newer .zipx
format isn't supported).
3this makes no sense, where is the password? – Alexander Mills – 2019-05-07T19:27:09.200
4@AlexanderMills Most password-accepting tools prompt the user for it from the terminal rather than a command line argument, as to prevent the password showing up in history. – Daffy – 2019-05-26T03:52:52.510