summaryrefslogtreecommitdiff
path: root/tech/how to encrypt a file or directory in linux.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tech/how to encrypt a file or directory in linux.txt')
-rw-r--r--tech/how to encrypt a file or directory in linux.txt31
1 files changed, 31 insertions, 0 deletions
diff --git a/tech/how to encrypt a file or directory in linux.txt b/tech/how to encrypt a file or directory in linux.txt
new file mode 100644
index 0000000..ebb28c8
--- /dev/null
+++ b/tech/how to encrypt a file or directory in linux.txt
@@ -0,0 +1,31 @@
+---
+title: encryption - How to encrypt a file or directory in Linux?
+date: 2015-10-03T14:06:45Z
+source: http://superuser.com/questions/249497/how-to-encrypt-a-file-or-directory-in-linux
+tags: security
+
+---
+
+I think it would be gpg. The syntax for files and directories differs though.
+
+## Encryption
+
+For files(outputs filename.gpg):
+
+ gpg -c filename
+
+For dirs:
+
+ gpg-zip -c -o file.gpg dirname
+
+## Decryption
+
+For files(outputs filename.gpg):
+
+ gpg filename.gpg
+
+For dirs:
+
+ gpg-zip -d file.gpg
+
+Edit: Corrected as @Mk12 pointed out the mistake of compression/decompression for encryption/decryption. \ No newline at end of file