{"id":3311,"date":"2022-02-09T12:06:27","date_gmt":"2022-02-09T11:06:27","guid":{"rendered":"https:\/\/kudzia.eu\/b\/?p=3311"},"modified":"2022-04-08T14:24:54","modified_gmt":"2022-04-08T13:24:54","slug":"bash-finding-files-who-have-one-of-parent-folders-with-a-very-specific-name-and-contain-specific-sub-string","status":"publish","type":"post","link":"https:\/\/kudzia.eu\/b\/2022\/02\/bash-finding-files-who-have-one-of-parent-folders-with-a-very-specific-name-and-contain-specific-sub-string\/","title":{"rendered":"bash &#8211; finding files which have one of parent folders with a very specific name, and contain specific sub string"},"content":{"rendered":"<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nfind . -maxdepth 5 -type f -path &quot;*sites-available\/*&quot;|xargs egrep -i openid\r\n\r\ngives me:\r\n.\/server0\/etc\/apache2\/sites-available\/some.vhost.eu.conf:        DocumentRoot \/var\/www\/openIdKnp\/public\r\n.\/server1\/etc\/apache2\/sites-available\/different.vhost.eu.conf:            OIDCRedirectURI https:\/\/bla.bla.bla.\r\n<\/pre>\n<p>and to compress all of the files into single tar archive:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nfind . -maxdepth 5 -type f -path &quot;*sites-available\/*&quot; -exec tar -rvf \/tmp\/out.tar {} \\;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>find . -maxdepth 5 -type f -path &quot;*sites-available\/*&quot;|xargs egrep -i openid gives me: .\/server0\/etc\/apache2\/sites-available\/some.vhost.eu.conf: DocumentRoot \/var\/www\/openIdKnp\/public .\/server1\/etc\/apache2\/sites-available\/different.vhost.eu.conf: OIDCRedirectURI https:\/\/bla.bla.bla. and to compress all of the files into single tar archive: find . -maxdepth 5 -type f -path &quot;*sites-available\/*&quot; -exec tar -rvf \/tmp\/out.tar {} \\;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[51],"tags":[],"class_list":["post-3311","post","type-post","status-publish","format-standard","hentry","category-unimportant"],"_links":{"self":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/3311","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/comments?post=3311"}],"version-history":[{"count":4,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/3311\/revisions"}],"predecessor-version":[{"id":3345,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/3311\/revisions\/3345"}],"wp:attachment":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/media?parent=3311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/categories?post=3311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/tags?post=3311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}