Compressione e criptazione file da shell

Tramite questa riga da shell o in uno script bash è possibile comprimere e criptare un file.

tar cvf - nomefile | bzip2 -9 | openssl enc -blowfish -salt -out nomefile.tar.bz2.enc -k password

Lo scopo può essere ad esempio il successivo invio o upload su cloud.
Per decriptare i file:

openssl enc -d -blowfish -in nomefile.tar.bz2.enc | bzip2 -d | tar vxf -

3 thoughts on “Compressione e criptazione file da shell

  1. Congrats to the winner! It does throw us off a day when schedules change like it did this week for you. But the nice thing is at least you know for sure tomorrow is SATURDAY!! I don't have a laptop, hubby and son do (how did that happen??) Hubby has a Gateway; its okay; I really don't like the pad on it for moving the cursor around; I can't get the hang of it like I did on son's Hewlett Packward one. Hope Santa is kind and brings you a great one at Char!tmassind hope you have a great weekend!betty

Leave a Reply

Your email address will not be published. Required fields are marked *