Skip to main content

Encrypt a file in Linux



# vim test.txt (write something here)
 
This is a Test file
 
:wq
Now see the Content of the file using cat command
 
# cat test.txt
 
This is Test file
 
Now we are going to Encrypt the file with gpg
 
# gpg -c test.txt
 
Enter Pass-phrase : <YOUR-PASSWORD>
Repeat Pass-phrase : <YOUR-PASSWORD>
 
You can see one more file create
 
# ls -l test*
-rw-rr 1 root root 59 2011-03-02 17:20 test.txt
-rw-rr 1 root root 97 2011-03-02 17:23 test.txt.gpg
 
Lets try to see encrypt file with cat command
 
# cat test.txt.gpg
i+`P$@CoEkW%>o
8*zbB`EA9{7
IW
 
Delete original File
 
# rm test.txt
 
Now we are going to decrypt the encrypted file
 
# gpg test.txt.gpg
Enter Pass-phrase : <YOUR-PASSWORD>
 
See decrypted file content
 
# cat test.txt
This is a Test file

Comments

Popular posts from this blog

How to lock any file or folder without any software.

  With this trick, you can create a secure password protected  folder  in Windows which no one except you can access. To use this trick, follow the instructions given below:-   1.  Open  Notepad . 2.   Copy and paste  the exact code given below:- cls @ECHO OFF title computer-tricks-corner.blogspot.com if  EXIST  "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto  UNLOCK if NOT EXIST MyFolder goto MDMyFolder :CONFIRM echo Are you sure to lock this folder? (Y/N) set/p "cho=>" if %cho%==Y goto LOCK if %cho%==y goto LOCK if %cho%==n goto END if %cho%==N goto END echo  Invalid  choice. goto CONFIRM :LOCK ren MyFolder "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" echo Folder locked goto End :UNLOCK echo Enter password to Unlock Your Secure Folder set/p "pass=...

Medal of Honor: Warfighter GPU & CPU Performance

Released on PC, Xbox 360 and PlayStation 3 in October 2010, Danger Close and EA's Medal of Honor reboot brought the franchise to modern-day Afghanistan after a dozen previous titles set during World War II. Having been a fan of entries including Medal of Honor: Airborne and Medal of Honor: Pacific Assault, I was excited to crack open the latest version and test its performance on enthusiast hardware . Although its graphics weren't groundbreaking, 2010's Medal of Honor looked decent while allowing low-end GPUs to provide playable performance using respectable quality settings. Looking at the old benchmarks I see that even then quad-core processors were a must, with dual-core chips giving half as much performance. Having grown accustomed to Modern Warfare-like titles, Medal of Honor's relatively tame GPU requirements weren't too shocking. Interestingly, it seems Medal of Honor: Warfighter might buck that trend, as its recommended system specificati...

The best free automation tools for Windows

When your job involves working on a computer, repetitive actions can be the bane of your existence. They're not only tedious, but also (even worse) time consuming. Fortunately, in case you're forced to execute the exact same actions over and over again, you can create macros (scripts) that will automatically do them for you. Let's say, for example, that every day you have to open your downloads folder; to do this, you would normally have to click on 'Start', then on 'Documents' and from there finally click on 'Downloads'. Using a macro, you could simply run a certain file from your desktop or (even better) use a key combination, and the download folder will be automatically opened. (Of course, this was very simplistic, but you can use macro scripts to perform much more complicated tasks.) Here you will find a list with some of the best automation tools on the market. These applications won't only help you improve your productivity with macr...