{"id":4557,"date":"2018-08-31T21:55:48","date_gmt":"2018-08-31T21:55:48","guid":{"rendered":"https:\/\/geekdecoder.com\/?p=4557"},"modified":"2018-08-31T21:55:48","modified_gmt":"2018-08-31T21:55:48","slug":"how-do-i-find-all-files-containing-specific-text-on-linux-with-find","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2018\/08\/31\/how-do-i-find-all-files-containing-specific-text-on-linux-with-find\/","title":{"rendered":"How do I find all files containing specific text on Linux?- with find"},"content":{"rendered":"<p>I recently had a challenge to look at code. The IP was redirecting to another IP and after testing decided to check the code. This is in Plesk:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# find \/var\/www\/vhosts\/domain.com\/httpdocs\/ -type f -exec grep -H &#039;216.xx.bb.cc&#039; {} \\;\n<\/pre>\n<p>And voila! There were 2 files with the hardcoded IP in the config file. This will also work with other strings as well.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recently had a challenge to look at code. The IP was redirecting to another IP and after testing decided to check the code. This is in Plesk: # find \/var\/www\/vhosts\/domain.com\/httpdocs\/ -type f -exec grep -H &#039;216.xx.bb.cc&#039; {} \\; And voila! There were 2 files with the hardcoded IP in the config file. This will &#8230; <a title=\"How do I find all files containing specific text on Linux?- with find\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2018\/08\/31\/how-do-i-find-all-files-containing-specific-text-on-linux-with-find\/\" aria-label=\"Read more about How do I find all files containing specific text on Linux?- with find\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[139],"class_list":["post-4557","post","type-post","status-publish","format-standard","hentry","category-administration","tag-linux"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/4557","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=4557"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/4557\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=4557"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=4557"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=4557"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}