{"id":2173,"date":"2018-09-24T12:25:32","date_gmt":"2018-09-24T11:25:32","guid":{"rendered":"https:\/\/research.reading.ac.uk\/act\/?post_type=kbe_knowledgebase&#038;p=2173"},"modified":"2020-04-23T10:49:07","modified_gmt":"2020-04-23T09:49:07","slug":"cheat-sheet-linux-commands","status":"publish","type":"kbe_knowledgebase","link":"https:\/\/research.reading.ac.uk\/act\/knowledgebase\/cheat-sheet-linux-commands\/","title":{"rendered":"Cheat sheet: Linux commands"},"content":{"rendered":"<h2>Link to a comprehensive linux cheat sheet:<\/h2>\n<p><a href=\"https:\/\/www.cheatography.com\/davechild\/cheat-sheets\/linux-command-line\/pdf\/\">https:\/\/www.cheatography.com\/davechild\/cheat-sheets\/linux-command-line\/pdf\/<\/a><\/p>\n<h2>Replace string in multiple files<\/h2>\n<p>Replace string1 by string2 in 1 file<\/p>\n<pre class=\"lang:default decode:true\">sed -i -e \"s\/string1\/string2\/g\" file<\/pre>\n<p>Replace recursively:<\/p>\n<pre class=\"lang:default decode:true\">find &lt;dir&gt; -type f -print0 | xargs -0 sed -i -e 's\/chainorigin\/newchain\/g'<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Link to a comprehensive linux cheat sheet:  https:\/\/www.cheatography.com\/davechild\/cheat-sheets\/linux-command-line\/pdf\/  Replace string in multiple files  Replace string1 by string2 in 1 file  sed -i -e &#8220;s\/string1\/string2\/g&#8221; file  Replace recursively:  find &lt;dir&gt; -type f -print0 | xargs -0 sed -i -e &#8216;s\/chainorigin\/newchain\/g&#8217; <\/p>\n","protected":false},"author":3,"featured_media":1026,"template":"","meta":{"_acf_changed":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"__cvm_playback_settings":[],"__cvm_video_id":"","_links_to":"","_links_to_target":""},"kbe_taxonomy":[],"kbe_tags":[],"class_list":["post-2173","kbe_knowledgebase","type-kbe_knowledgebase","status-publish","has-post-thumbnail","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Cheat sheet: Linux commands - Academic Computing Team<\/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:\/\/research.reading.ac.uk\/act\/knowledgebase\/cheat-sheet-linux-commands\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Cheat sheet: Linux commands - Academic Computing Team\" \/>\n<meta property=\"og:description\" content=\"Link to a comprehensive linux cheat sheet: https:\/\/www.cheatography.com\/davechild\/cheat-sheets\/linux-command-line\/pdf\/ Replace string in multiple files Replace string1 by string2 in 1 file sed -i -e &quot;s\/string1\/string2\/g&quot; file Replace recursively: find &lt;dir&gt; -type f -print0 | xargs -0 sed -i -e &#039;s\/chainorigin\/newchain\/g&#039;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/research.reading.ac.uk\/act\/knowledgebase\/cheat-sheet-linux-commands\/\" \/>\n<meta property=\"og:site_name\" content=\"Academic Computing Team\" \/>\n<meta property=\"article:modified_time\" content=\"2020-04-23T09:49:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/research.reading.ac.uk\/act\/wp-content\/uploads\/sites\/2\/icons\/tools.png\" \/>\n\t<meta property=\"og:image:width\" content=\"128\" \/>\n\t<meta property=\"og:image:height\" content=\"128\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/research.reading.ac.uk\/act\/knowledgebase\/cheat-sheet-linux-commands\/\",\"url\":\"https:\/\/research.reading.ac.uk\/act\/knowledgebase\/cheat-sheet-linux-commands\/\",\"name\":\"Cheat sheet: Linux commands - Academic Computing Team\",\"isPartOf\":{\"@id\":\"https:\/\/research.reading.ac.uk\/act\/#website\"},\"datePublished\":\"2018-09-24T11:25:32+00:00\",\"dateModified\":\"2020-04-23T09:49:07+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/research.reading.ac.uk\/act\/knowledgebase\/cheat-sheet-linux-commands\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/research.reading.ac.uk\/act\/knowledgebase\/cheat-sheet-linux-commands\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/research.reading.ac.uk\/act\/knowledgebase\/cheat-sheet-linux-commands\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/research.reading.ac.uk\/act\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Knowledgebase\",\"item\":\"https:\/\/research.reading.ac.uk\/act\/knowledgebase\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Cheat sheet: Linux commands\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/research.reading.ac.uk\/act\/#website\",\"url\":\"https:\/\/research.reading.ac.uk\/act\/\",\"name\":\"Academic Computing Team\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/research.reading.ac.uk\/act\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/research.reading.ac.uk\/act\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/research.reading.ac.uk\/act\/#organization\",\"name\":\"University of Reading\",\"url\":\"https:\/\/research.reading.ac.uk\/act\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/research.reading.ac.uk\/act\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/research.reading.ac.uk\/act\/wp-content\/uploads\/sites\/2\/2017\/08\/cropped-University_of_Reading_shield-1.png\",\"contentUrl\":\"https:\/\/research.reading.ac.uk\/act\/wp-content\/uploads\/sites\/2\/2017\/08\/cropped-University_of_Reading_shield-1.png\",\"width\":512,\"height\":512,\"caption\":\"University of Reading\"},\"image\":{\"@id\":\"https:\/\/research.reading.ac.uk\/act\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Cheat sheet: Linux commands - Academic Computing Team","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:\/\/research.reading.ac.uk\/act\/knowledgebase\/cheat-sheet-linux-commands\/","og_locale":"en_GB","og_type":"article","og_title":"Cheat sheet: Linux commands - Academic Computing Team","og_description":"Link to a comprehensive linux cheat sheet: https:\/\/www.cheatography.com\/davechild\/cheat-sheets\/linux-command-line\/pdf\/ Replace string in multiple files Replace string1 by string2 in 1 file sed -i -e \"s\/string1\/string2\/g\" file Replace recursively: find &lt;dir&gt; -type f -print0 | xargs -0 sed -i -e 's\/chainorigin\/newchain\/g'","og_url":"https:\/\/research.reading.ac.uk\/act\/knowledgebase\/cheat-sheet-linux-commands\/","og_site_name":"Academic Computing Team","article_modified_time":"2020-04-23T09:49:07+00:00","og_image":[{"width":128,"height":128,"url":"https:\/\/research.reading.ac.uk\/act\/wp-content\/uploads\/sites\/2\/icons\/tools.png","type":"image\/png"}],"twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/research.reading.ac.uk\/act\/knowledgebase\/cheat-sheet-linux-commands\/","url":"https:\/\/research.reading.ac.uk\/act\/knowledgebase\/cheat-sheet-linux-commands\/","name":"Cheat sheet: Linux commands - Academic Computing Team","isPartOf":{"@id":"https:\/\/research.reading.ac.uk\/act\/#website"},"datePublished":"2018-09-24T11:25:32+00:00","dateModified":"2020-04-23T09:49:07+00:00","breadcrumb":{"@id":"https:\/\/research.reading.ac.uk\/act\/knowledgebase\/cheat-sheet-linux-commands\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/research.reading.ac.uk\/act\/knowledgebase\/cheat-sheet-linux-commands\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/research.reading.ac.uk\/act\/knowledgebase\/cheat-sheet-linux-commands\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/research.reading.ac.uk\/act\/"},{"@type":"ListItem","position":2,"name":"Knowledgebase","item":"https:\/\/research.reading.ac.uk\/act\/knowledgebase\/"},{"@type":"ListItem","position":3,"name":"Cheat sheet: Linux commands"}]},{"@type":"WebSite","@id":"https:\/\/research.reading.ac.uk\/act\/#website","url":"https:\/\/research.reading.ac.uk\/act\/","name":"Academic Computing Team","description":"","publisher":{"@id":"https:\/\/research.reading.ac.uk\/act\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/research.reading.ac.uk\/act\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/research.reading.ac.uk\/act\/#organization","name":"University of Reading","url":"https:\/\/research.reading.ac.uk\/act\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/research.reading.ac.uk\/act\/#\/schema\/logo\/image\/","url":"https:\/\/research.reading.ac.uk\/act\/wp-content\/uploads\/sites\/2\/2017\/08\/cropped-University_of_Reading_shield-1.png","contentUrl":"https:\/\/research.reading.ac.uk\/act\/wp-content\/uploads\/sites\/2\/2017\/08\/cropped-University_of_Reading_shield-1.png","width":512,"height":512,"caption":"University of Reading"},"image":{"@id":"https:\/\/research.reading.ac.uk\/act\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/research.reading.ac.uk\/act\/wp-json\/wp\/v2\/kbe_knowledgebase\/2173","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/research.reading.ac.uk\/act\/wp-json\/wp\/v2\/kbe_knowledgebase"}],"about":[{"href":"https:\/\/research.reading.ac.uk\/act\/wp-json\/wp\/v2\/types\/kbe_knowledgebase"}],"author":[{"embeddable":true,"href":"https:\/\/research.reading.ac.uk\/act\/wp-json\/wp\/v2\/users\/3"}],"version-history":[{"count":4,"href":"https:\/\/research.reading.ac.uk\/act\/wp-json\/wp\/v2\/kbe_knowledgebase\/2173\/revisions"}],"predecessor-version":[{"id":2177,"href":"https:\/\/research.reading.ac.uk\/act\/wp-json\/wp\/v2\/kbe_knowledgebase\/2173\/revisions\/2177"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/research.reading.ac.uk\/act\/wp-json\/wp\/v2\/media\/1026"}],"wp:attachment":[{"href":"https:\/\/research.reading.ac.uk\/act\/wp-json\/wp\/v2\/media?parent=2173"}],"wp:term":[{"taxonomy":"kbe_taxonomy","embeddable":true,"href":"https:\/\/research.reading.ac.uk\/act\/wp-json\/wp\/v2\/kbe_taxonomy?post=2173"},{"taxonomy":"kbe_tags","embeddable":true,"href":"https:\/\/research.reading.ac.uk\/act\/wp-json\/wp\/v2\/kbe_tags?post=2173"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}