Password Protect Tar.gz File < 2027 >

zip --encrypt secured_container.zip backup.tar.gz Then delete the original tar.gz . To extract: unzip with the password, then untar. Best for: Automation scripts and users who want to avoid creating intermediate files.

| To do this... | Use this command... | |---------------|----------------------| | Encrypt an existing .tar.gz | openssl enc -aes-256-cbc -salt -in file.tar.gz -out file.enc | | Decrypt and extract | openssl enc -d -aes-256-cbc -in file.enc | tar xz | | Create from scratch (no trace) | tar cz folder/ | openssl enc -aes-256-cbc -out backup.enc | | Use GPG instead | gpg --symmetric --cipher-algo AES256 file.tar.gz | password protect tar.gz file

By adding a password through or GPG , you transform that cardboard box into a steel safe. The process takes only a single extra command, but the security gains are immeasurable. zip --encrypt secured_container

Now go ahead: password protect your tar.gz files. Your data—and your peace of mind—will thank you. | To do this