{"id":3690,"date":"2010-12-13T10:32:11","date_gmt":"2010-12-13T15:32:11","guid":{"rendered":"http:\/\/g33kinfo.com\/info\/?p=3690"},"modified":"2010-12-13T10:32:11","modified_gmt":"2010-12-13T15:32:11","slug":"encrypt-text-files-with-vim","status":"publish","type":"post","link":"https:\/\/g33kinfo.com\/info\/encrypt-text-files-with-vim\/","title":{"rendered":"Encrypt text files with vim"},"content":{"rendered":"<p>From <a href=\"http:\/\/www.go2linux.org\/linux\/2010\/12\/how-encrypt-text-files-vi-or-vim-linux-869\" target=\"_blank\" rel=\"noopener noreferrer\">go2linux.org<\/a><\/p>\n<p>We all sometimes needs to encrypt files, but if you are just encrypting text files, there are easier options. One of them is vi or vim. I\u2019m a fan of vim and it is my favorite text editor, it can encrypt files, check spelling, etc. We\u2019ll now learn how to encrypt files using vim or vi.<\/p>\n<p><strong>How to encrypt text files with vim\/vi<\/strong><\/p>\n<p>Encrypt a file using Linux vi \/ vim, is easy just use the -x option when you create the file.<br \/>\n<code><br \/>\nvim -x some-text-file.txt<\/code><\/p>\n<p>Now vim will ask you for a password to able to decrypt the file later for you.<\/p>\n<p>Be sure to remember your password, or you will not be able to decrypt your file, actually you will not be able to open your file.<\/p>\n<p>Let\u2019s see an example of an encrypted file, suppose this is the content of the file.<\/p>\n<p>This is an example of how vim can encrypt files in Linux.<br \/>\nThis file, will be encrypted and then I will &#8216;cat&#8217; them to see if they are encrypted.<\/p>\n<p>This is how it looks, if you do not have the password.<br \/>\n<code><br \/>\ncat some-text-file.txt<br \/>\nVimCrypt~01!J\u00e2\u00ea\u00e0)\u00c3M\u00e9\u00d1#\u00aa5d\u00c2gL\u00af=\u00c7\u00b6\u00cb\u00d0\u00ef\u00d8Fo\u00e0\u00b8ff\u00af#\u00a5\u00e1Z1^\u00ea$\u00d4\u00eeA\u00f5\u00c4P\u00f7\u00d6\u00ack%\u00bc\u00efv{\u00bdv\\\u00a2\u00e2?\u00a1hA|\u00c3\u00a4\u00e1)\u00e1\u00f8\u00bco#-&\u00f5\u00ae\u00fd=\u00cc\u00fa]xx\u00f4~\u2019\u00cb\u00a3\u00f16Of#\u00f8O\u00c0\u00ea\u00c5\u00c1\u00b2\u00db\u00d2\u00a8:\u00b3a\u00b9]yJw\u00bc\u00acf\u00d4<br \/>\n<\/code><\/p>\n<p>And if you open it with vim, and do not enter the correct encryption password, you will something similar.<\/p>\n<p>From <a href=\"http:\/\/www.go2linux.org\/linux\/2010\/12\/how-encrypt-text-files-vi-or-vim-linux-869\" target=\"_blank\" rel=\"noopener noreferrer\">go2linux.org<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>From go2linux.org We all sometimes needs to encrypt files, but if you are just encrypting text files, there are easier options. One of them is vi or vim. I\u2019m a fan of vim and it is my favorite text editor, it can encrypt files, check spelling, etc. We\u2019ll now learn how to encrypt files using&#8230; <\/p>\n<div class=\"read-more navbutton\"><a href=\"https:\/\/g33kinfo.com\/info\/encrypt-text-files-with-vim\/\">Read More<i class=\"fa fa-angle-double-right\"><\/i><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-3690","post","type-post","status-publish","format-standard","hentry","category-info"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Encrypt text files with vim - Linux Shtuff<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/g33kinfo.com\/info\/encrypt-text-files-with-vim\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Encrypt text files with vim - Linux Shtuff\" \/>\n<meta property=\"og:description\" content=\"From go2linux.org We all sometimes needs to encrypt files, but if you are just encrypting text files, there are easier options. One of them is vi or vim. I\u2019m a fan of vim and it is my favorite text editor, it can encrypt files, check spelling, etc. We\u2019ll now learn how to encrypt files using... Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/g33kinfo.com\/info\/encrypt-text-files-with-vim\/\" \/>\n<meta property=\"og:site_name\" content=\"Linux Shtuff\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:author\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:published_time\" content=\"2010-12-13T15:32:11+00:00\" \/>\n<meta name=\"author\" content=\"g33kadmin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/drsinger1111\" \/>\n<meta name=\"twitter:site\" content=\"@drsinger1111\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/encrypt-text-files-with-vim\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/encrypt-text-files-with-vim\\\/\"},\"author\":{\"name\":\"g33kadmin\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"headline\":\"Encrypt text files with vim\",\"datePublished\":\"2010-12-13T15:32:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/encrypt-text-files-with-vim\\\/\"},\"wordCount\":218,\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"articleSection\":[\"General Info\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/encrypt-text-files-with-vim\\\/\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/encrypt-text-files-with-vim\\\/\",\"name\":\"Encrypt text files with vim - Linux Shtuff\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\"},\"datePublished\":\"2010-12-13T15:32:11+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/encrypt-text-files-with-vim\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/g33kinfo.com\\\/info\\\/encrypt-text-files-with-vim\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/encrypt-text-files-with-vim\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Encrypt text files with vim\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\",\"name\":\"Linux Shtuff\",\"description\":\"Because I have CRS Syndrome...\",\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\",\"name\":\"g33kadmin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"contentUrl\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"width\":512,\"height\":512,\"caption\":\"g33kadmin\"},\"logo\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\"},\"description\":\"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\\\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....\",\"sameAs\":[\"https:\\\/\\\/thelinuxreport.com\",\"https:\\\/\\\/fb.me\\\/g33kinf0\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/drsinger1111\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Encrypt text files with vim - Linux Shtuff","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/g33kinfo.com\/info\/encrypt-text-files-with-vim\/","og_locale":"en_US","og_type":"article","og_title":"Encrypt text files with vim - Linux Shtuff","og_description":"From go2linux.org We all sometimes needs to encrypt files, but if you are just encrypting text files, there are easier options. One of them is vi or vim. I\u2019m a fan of vim and it is my favorite text editor, it can encrypt files, check spelling, etc. We\u2019ll now learn how to encrypt files using... Read More","og_url":"https:\/\/g33kinfo.com\/info\/encrypt-text-files-with-vim\/","og_site_name":"Linux Shtuff","article_publisher":"https:\/\/fb.me\/g33kinf0","article_author":"https:\/\/fb.me\/g33kinf0","article_published_time":"2010-12-13T15:32:11+00:00","author":"g33kadmin","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/drsinger1111","twitter_site":"@drsinger1111","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/g33kinfo.com\/info\/encrypt-text-files-with-vim\/#article","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/encrypt-text-files-with-vim\/"},"author":{"name":"g33kadmin","@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"headline":"Encrypt text files with vim","datePublished":"2010-12-13T15:32:11+00:00","mainEntityOfPage":{"@id":"https:\/\/g33kinfo.com\/info\/encrypt-text-files-with-vim\/"},"wordCount":218,"publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"articleSection":["General Info"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/g33kinfo.com\/info\/encrypt-text-files-with-vim\/","url":"https:\/\/g33kinfo.com\/info\/encrypt-text-files-with-vim\/","name":"Encrypt text files with vim - Linux Shtuff","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/#website"},"datePublished":"2010-12-13T15:32:11+00:00","breadcrumb":{"@id":"https:\/\/g33kinfo.com\/info\/encrypt-text-files-with-vim\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/g33kinfo.com\/info\/encrypt-text-files-with-vim\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/g33kinfo.com\/info\/encrypt-text-files-with-vim\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/g33kinfo.com\/info\/"},{"@type":"ListItem","position":2,"name":"Encrypt text files with vim"}]},{"@type":"WebSite","@id":"https:\/\/g33kinfo.com\/info\/#website","url":"https:\/\/g33kinfo.com\/info\/","name":"Linux Shtuff","description":"Because I have CRS Syndrome...","publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/g33kinfo.com\/info\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547","name":"g33kadmin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","url":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","contentUrl":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","width":512,"height":512,"caption":"g33kadmin"},"logo":{"@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif"},"description":"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....","sameAs":["https:\/\/thelinuxreport.com","https:\/\/fb.me\/g33kinf0","https:\/\/x.com\/https:\/\/twitter.com\/drsinger1111"]}]}},"_links":{"self":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/3690","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/comments?post=3690"}],"version-history":[{"count":0,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/3690\/revisions"}],"wp:attachment":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/media?parent=3690"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/categories?post=3690"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/tags?post=3690"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}