{"id":34,"date":"2009-08-15T03:57:44","date_gmt":"2009-08-15T03:57:44","guid":{"rendered":"http:\/\/www.adriangrigoras.com\/blog\/?p=34"},"modified":"2015-01-09T21:46:14","modified_gmt":"2015-01-09T21:46:14","slug":"search-text-inside-a-file-recursively","status":"publish","type":"post","link":"https:\/\/adriangrigoras.com\/blog\/search-text-inside-a-file-recursively\/","title":{"rendered":"Search text inside a file recursively"},"content":{"rendered":"<p>When you need to search recursively inside a structure of directories you need to run the following command from the console:<\/p>\n<address><span style=\"font-family: arial; font-size: 13px;\">find \/srv -type f -follow -exec grep &#8211;with-filename &#8211;line-number &#8220;apache2ctl&#8221; {} ;<\/span><\/address>\n<p><span style=\"font-family: arial; font-size: 13px;\">This will search in every file from every folder from \/srv and will show in which file and at each line it finds the right information.<\/span><\/p>\n<p><span style=\"font-family: arial; font-size: 13px;\">Cheers,<br \/>\n<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you need to search recursively inside a structure of directories you need to run the following command from the console: find \/srv -type f -follow -exec grep &#8211;with-filename &#8211;line-number &#8220;apache2ctl&#8221; {} ; This will search in every file from every folder from \/srv and will show in which file and at each line it\u2026 <span class=\"read-more\"><a href=\"https:\/\/adriangrigoras.com\/blog\/search-text-inside-a-file-recursively\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,1],"tags":[],"class_list":["post-34","post","type-post","status-publish","format-standard","hentry","category-linux","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/posts\/34","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/comments?post=34"}],"version-history":[{"count":1,"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/posts\/34\/revisions"}],"predecessor-version":[{"id":213,"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/posts\/34\/revisions\/213"}],"wp:attachment":[{"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/media?parent=34"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/categories?post=34"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/tags?post=34"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}