{"id":221,"date":"2009-12-02T17:04:51","date_gmt":"2009-12-02T16:04:51","guid":{"rendered":"http:\/\/webpiraten.de\/?p=221"},"modified":"2009-12-02T17:05:54","modified_gmt":"2009-12-02T16:05:54","slug":"shell-scripting-guide","status":"publish","type":"post","link":"https:\/\/webpiraten.de\/index.php\/server\/shell-scripting-guide\/","title":{"rendered":"Shell Scripting Guide"},"content":{"rendered":"<p>Hier findet Ihr den Shell Scripting Guide:<\/p>\n<p><a href=\"http:\/\/www.freeos.com\/guides\/lsst\/\" target=\"_blank\">freeos.com\/guides\/lsst\/<\/a><\/p>\n<p>Dann kann man beispielsweise so kleine Helferlein zum L\u00f6schen von Logs und Caches wie diesen hier basteln:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n#!\/bin\/bash\r\ncd `dirname $0` # go to scripts dir\r\ncd .. # step ahead\r\narr&#x5B;0]='Application1\/app\/cache\/*'\r\narr&#x5B;1]='Application1\/var\/cache\/*'\r\narr&#x5B;2]='Application2\/application\/cache\/*'\r\narr&#x5B;3]='Application2\/application\/logs\/*'\r\narr&#x5B;4]='Application2\/pub\/tmp\/*'\r\narr&#x5B;5]='Application3\/application\/cache\/*'\r\narr&#x5B;6]='Application3\/application\/logs\/*'\r\narr&#x5B;7]='Application3\/pub\/tmp\/*'\r\n\r\ni=0\r\nwhile &#x5B; $i -lt ${#arr&#x5B;@]} ]\r\ndo\r\n\r\nrm -rf ${arr&#x5B;$i]}\r\necho &quot;${arr&#x5B;$i]} deleted&quot;\r\n\r\n(( i=$i+1 ))\r\ndone\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Hier findet Ihr den Shell Scripting Guide: freeos.com\/guides\/lsst\/ Dann kann man beispielsweise so kleine Helferlein zum L\u00f6schen von Logs und Caches wie diesen hier basteln: #!\/bin\/bash cd `dirname $0` # go to scripts dir cd .. # step ahead arr&#x5B;0]=&#8217;Application1\/app\/cache\/*&#8216; arr&#x5B;1]=&#8217;Application1\/var\/cache\/*&#8216; arr&#x5B;2]=&#8217;Application2\/application\/cache\/*&#8216; arr&#x5B;3]=&#8217;Application2\/application\/logs\/*&#8216; arr&#x5B;4]=&#8217;Application2\/pub\/tmp\/*&#8216; arr&#x5B;5]=&#8217;Application3\/application\/cache\/*&#8216; arr&#x5B;6]=&#8217;Application3\/application\/logs\/*&#8216; arr&#x5B;7]=&#8217;Application3\/pub\/tmp\/*&#8216; i=0 while &#x5B; $i -lt ${#arr&#x5B;@]} ] do [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[77,75,54,76],"tags":[144,143,146,100,644,142,645,145],"class_list":["post-221","post","type-post","status-publish","format-standard","hentry","category-deployment","category-linux","category-server","category-shell","tag-bash","tag-bin","tag-freeos","tag-guide","tag-linux","tag-scripting","tag-shell","tag-ssh"],"_links":{"self":[{"href":"https:\/\/webpiraten.de\/index.php\/wp-json\/wp\/v2\/posts\/221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webpiraten.de\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webpiraten.de\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webpiraten.de\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webpiraten.de\/index.php\/wp-json\/wp\/v2\/comments?post=221"}],"version-history":[{"count":2,"href":"https:\/\/webpiraten.de\/index.php\/wp-json\/wp\/v2\/posts\/221\/revisions"}],"predecessor-version":[{"id":223,"href":"https:\/\/webpiraten.de\/index.php\/wp-json\/wp\/v2\/posts\/221\/revisions\/223"}],"wp:attachment":[{"href":"https:\/\/webpiraten.de\/index.php\/wp-json\/wp\/v2\/media?parent=221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webpiraten.de\/index.php\/wp-json\/wp\/v2\/categories?post=221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webpiraten.de\/index.php\/wp-json\/wp\/v2\/tags?post=221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}