PC & IT SUPPORT MADE EASY FORUM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Linux File Encryption With GPG On Linux

Go down

Linux File Encryption With GPG On Linux Empty Linux File Encryption With GPG On Linux

Post by jamied_uk 31st July 2016, 21:57



Install for older Mint versions, earlier than Mint 18.1, after Mint 17 it is built in and wont need installing!

Code:
sudo apt-get install -y gpg


File Enc
Code:
#!/bin/bash
# Usage: ./Enc.sh
echo "Welcome, I am ready to encrypt a file/folder for you"
echo "currently I have a limitation, Place me to thh same folder, where a file to be
encrypted is present"
echo "Enter the Exact File Name with extension"
read file;
gpg -c $file # -e
echo "I have encrypted the file successfully..."
echo "Now I will be removing the original file"
rm -rf $file


File Dec
Code:
#!/bin/bash
# Usage: ./Dec.sh
echo "Welcome, I am ready to encrypt a file/folder for you"
echo "currently I have a limitation, Place me to thh same folder, where a file to be
encrypted is present"
echo "Enter the Exact File Name with extension"
read file;
gpg --output revealed --decrypt $file
echo "I have Decrypted the file successfully..."
# rm -rf $file
file revealed





More about gpg Encryption
gnupg.org/gph/en/manual/x110.html
jamied_uk
jamied_uk
Admin

Posts : 2950
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum