{"id":113,"date":"2012-08-31T13:03:49","date_gmt":"2012-08-31T16:03:49","guid":{"rendered":"http:\/\/www.l9web.com.br\/blog\/?p=113"},"modified":"2020-01-16T21:07:16","modified_gmt":"2020-01-17T00:07:16","slug":"pesquisar-por-uma-string-recursivamente-no-linux","status":"publish","type":"post","link":"https:\/\/www.l9web.com.br\/blog\/?p=113","title":{"rendered":"Pesquisar por uma string recursivamente no Linux"},"content":{"rendered":"<p>Para pesquisar por um express\u00e3o ou string dentro de todos os arquivos do sistema digite:<\/p>\n<pre lang=\"bash\">cd \/\nfind . -type f -exec grep -l \"string\" {} +\n<\/pre>\n<p>Vers\u00f5es mais antigas de sistemas baseados em unix podem usar o comando xargs, para acelerar o processo<\/p>\n<pre lang=\"bash\">find \/ -type f | xargs grep -l \"string\"\n<\/pre>\n<p>Se quiser pesquisar o conte\u00fado dos arquivos somente dentro de determinada pasta<\/p>\n<pre lang=\"bash\">cd \/pasta\nfind . -type f -exec grep -l \"string\" {} +\n<\/pre>\n<p>Fonte: <a href=\"http:\/\/www.cyberciti.biz\/faq\/howto-recursively-search-all-files-for-words\/\">Cyberciti<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Para pesquisar por um express\u00e3o ou string dentro de todos os arquivos do sistema digite: cd \/ find . -type f -exec grep -l &#8220;string&#8221; {} + Vers\u00f5es mais antigas de sistemas baseados em unix podem usar o comando xargs,&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[29,65,119,149,151,161,181,188,189],"class_list":["post-113","post","type-post","status-publish","format-standard","hentry","category-linux","tag-as","tag-debian","tag-linux","tag-pastas","tag-pesquisar","tag-recursivamente","tag-string","tag-todas","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/www.l9web.com.br\/blog\/index.php?rest_route=\/wp\/v2\/posts\/113"}],"collection":[{"href":"https:\/\/www.l9web.com.br\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.l9web.com.br\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.l9web.com.br\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.l9web.com.br\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=113"}],"version-history":[{"count":1,"href":"https:\/\/www.l9web.com.br\/blog\/index.php?rest_route=\/wp\/v2\/posts\/113\/revisions"}],"predecessor-version":[{"id":300,"href":"https:\/\/www.l9web.com.br\/blog\/index.php?rest_route=\/wp\/v2\/posts\/113\/revisions\/300"}],"wp:attachment":[{"href":"https:\/\/www.l9web.com.br\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.l9web.com.br\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.l9web.com.br\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}