Some times we need to encrypt any file before sending to others , through mail or by any mean.
Script to encrypt any file
#!/bin/bash
echo "Enter the file location and file name to encrypt "
read a
gpg -c $a
echo "OK its done , now the original file will be deleted "
rm -rf $a
and when the receiver will receive the file he will decrypt the same file the following way
gpg -d 2.gpg > 3
before encrypting the file name 2
after encrypting the file name 2
after recovering the file and named it as 3
Script to encrypt any file
#!/bin/bash
echo "Enter the file location and file name to encrypt "
read a
gpg -c $a
echo "OK its done , now the original file will be deleted "
rm -rf $a
and when the receiver will receive the file he will decrypt the same file the following way
gpg -d 2.gpg > 3
before encrypting the file name 2
after encrypting the file name 2
after recovering the file and named it as 3
No comments:
Post a Comment