{"id":191,"date":"2012-09-25T15:10:48","date_gmt":"2012-09-25T14:10:48","guid":{"rendered":"http:\/\/www.sebcharrot.com\/blog\/?p=191"},"modified":"2012-09-25T15:10:48","modified_gmt":"2012-09-25T14:10:48","slug":"search-file-contents-in-unix","status":"publish","type":"post","link":"http:\/\/www.sebcharrot.com\/blog\/search-file-contents-in-unix\/","title":{"rendered":"Search file contents in UNIX"},"content":{"rendered":"<p>I found myself having to search through the contents of a bunch of files in Unix the other day, and wanted to find a command to do it for me.<\/p>\n<p>Cue some Googling, and I found exactly what I was looking for <a title=\"here\" href=\"http:\/\/www.unix.com\/unix-dummies-questions-answers\/24563-find-file-does-exist-under-unix.html\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>.<\/p>\n<pre>find . -name \"*\" -exec grep -l \"somestring\" {} \\;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I found myself having to search through the contents of a bunch of files in Unix the other day, and wanted to find a command to do it for me. Cue some Googling, and I found exactly what I was looking for here. find . -name &#8220;*&#8221; -exec grep -l &#8220;somestring&#8221; {} \\;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":""},"categories":[23,15],"tags":[],"_links":{"self":[{"href":"http:\/\/www.sebcharrot.com\/blog\/wp-json\/wp\/v2\/posts\/191"}],"collection":[{"href":"http:\/\/www.sebcharrot.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.sebcharrot.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.sebcharrot.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.sebcharrot.com\/blog\/wp-json\/wp\/v2\/comments?post=191"}],"version-history":[{"count":0,"href":"http:\/\/www.sebcharrot.com\/blog\/wp-json\/wp\/v2\/posts\/191\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.sebcharrot.com\/blog\/wp-json\/wp\/v2\/media?parent=191"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.sebcharrot.com\/blog\/wp-json\/wp\/v2\/categories?post=191"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.sebcharrot.com\/blog\/wp-json\/wp\/v2\/tags?post=191"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}