{"id":2000,"date":"2014-07-21T16:00:36","date_gmt":"2014-07-21T12:00:36","guid":{"rendered":"http:\/\/sandalov.org\/blog\/?p=2000"},"modified":"2014-08-03T01:40:44","modified_gmt":"2014-08-02T21:40:44","slug":"create-a-file-with-newline-symbol-in-linux","status":"publish","type":"post","link":"https:\/\/sandalov.org\/blog\/2000\/","title":{"rendered":"Create a file with newline symbol in Linux"},"content":{"rendered":"<div class=\"2d836d85a73757df15d0de19d7bef594\" data-index=\"1\" style=\"float: none; margin:10px 0 10px 0; text-align:center;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-2287684400845931\";\r\n\/* valerymorozov *\/\r\ngoogle_ad_slot = \"5606708872\";\r\ngoogle_ad_width = 728;\r\ngoogle_ad_height = 90;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n<p>If for some reasons one needs to create a file with UTF symbols in filename, the following command helps:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ntouch new$'\\n'file.txt\r\n<\/pre>\n<p><a href=\"https:\/\/sandalov.org\/blog\/wp-content\/uploads\/2014\/07\/20140721_155556.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sandalov.org\/blog\/wp-content\/uploads\/2014\/07\/20140721_155556-300x130.png\" alt=\"20140721_155556\" width=\"300\" height=\"130\" class=\"aligncenter size-medium wp-image-2001\" srcset=\"https:\/\/sandalov.org\/blog\/wp-content\/uploads\/2014\/07\/20140721_155556-300x130.png 300w, https:\/\/sandalov.org\/blog\/wp-content\/uploads\/2014\/07\/20140721_155556-250x108.png 250w, https:\/\/sandalov.org\/blog\/wp-content\/uploads\/2014\/07\/20140721_155556-150x65.png 150w, https:\/\/sandalov.org\/blog\/wp-content\/uploads\/2014\/07\/20140721_155556.png 429w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Or you can simply rename existing file:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nmv goodfile.txt bad$'\\n'file.txt\r\nmv goodfile.txt $'bad\\nfile.txt'\r\n<\/pre>\n<p><a href=\"https:\/\/sandalov.org\/blog\/wp-content\/uploads\/2014\/07\/20140721_155921.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sandalov.org\/blog\/wp-content\/uploads\/2014\/07\/20140721_155921-300x283.png\" alt=\"20140721_155921\" width=\"300\" height=\"283\" class=\"aligncenter size-medium wp-image-2002\" srcset=\"https:\/\/sandalov.org\/blog\/wp-content\/uploads\/2014\/07\/20140721_155921-300x283.png 300w, https:\/\/sandalov.org\/blog\/wp-content\/uploads\/2014\/07\/20140721_155921-158x150.png 158w, https:\/\/sandalov.org\/blog\/wp-content\/uploads\/2014\/07\/20140721_155921-150x141.png 150w, https:\/\/sandalov.org\/blog\/wp-content\/uploads\/2014\/07\/20140721_155921.png 475w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Hope this helps \ud83d\ude42<\/p>\n<div class=\"2d836d85a73757df15d0de19d7bef594\" data-index=\"1\" style=\"float: none; margin:10px 0 10px 0; text-align:center;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-2287684400845931\";\r\n\/* valerymorozov *\/\r\ngoogle_ad_slot = \"5606708872\";\r\ngoogle_ad_width = 728;\r\ngoogle_ad_height = 90;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>If for some reasons one needs to create a file with UTF symbols in filename, the following command helps: touch new$&#8217;\\n&#8217;file.txt Or you can simply rename existing file: mv goodfile.txt bad$&#8217;\\n&#8217;file.txt mv goodfile.txt $&#8217;bad\\nfile.txt&#8217; Hope this helps \ud83d\ude42<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[64,40,351,352],"class_list":["post-2000","post","type-post","status-publish","format-standard","hentry","category-unsorted","tag-bash","tag-linux","tag-qa","tag-testing"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/posts\/2000","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/comments?post=2000"}],"version-history":[{"count":1,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/posts\/2000\/revisions"}],"predecessor-version":[{"id":2003,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/posts\/2000\/revisions\/2003"}],"wp:attachment":[{"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/media?parent=2000"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/categories?post=2000"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/tags?post=2000"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}