The Windows zip format combines several different piece of functionality: compression e. 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. 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. Sign up to join this community.
The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. How do I password protect a. Ask Question. Asked 10 years ago. Active 6 months ago. Viewed k times. I'm using the Unix tar command as follows to tar up a directory and its files: tar cvzf fileToTar. Improve this question. Add a comment. Active Oldest Votes. Improve this answer.
Tanky Woo 1 1 silver badge 11 11 bronze badges. Christopher Neylan Christopher Neylan 8 8 silver badges 7 7 bronze badges. 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. You can use command: zip -P password file. Panta Panta 3 3 silver badges 2 2 bronze badges. Does zip know enough to scrub the password section of the command line the moment it's run so it doesn't show up or only shows up for millicsonds in a ps?
That's human readable. Many multi-user operating systems provide ways for any user to see the current command line of any other user; even on stand-alone systems there is always the threat of over-the-shoulder peeking. To decrypt the file later on, just do a: gpg fileToTar. Note: -c is short for --symmetric , i. As opposed to asymmetric, which involves public keys and private keys. For this example we used tar, gzip and gpg. If you do, there is no way to recover the data. It is also not as convenient because most systems do not come with the P7zip package installed.
The zip command provides options to allow you to encrypt archives. It uses a known insecure PKZIP algorithm and also requires you to add your passphrase on the command line. The benefit of this method is both Linux and Windows folks can extract the archive without any additional software. To extract the archive, use the normal unzip utility. The only difference is you will be asked for a password. So there you have my three favorite ways to created encrypted archives.
There are plenty more ways to accomplish this openssl, gpg-zip, bcrypt and some are better than others. If you data is really important, I suggest you read up on the different algorithms and signing methods that are out there and decide for yourself which is right.
This site uses Akismet to reduce spam. Learn how your comment data is processed. Username or Email Address. Remember Me.
0コメント