{"id":60,"date":"2015-09-07T23:14:09","date_gmt":"2015-09-07T20:14:09","guid":{"rendered":"http:\/\/small-service.com\/?p=60"},"modified":"2018-07-25T16:49:09","modified_gmt":"2018-07-25T13:49:09","slug":"useful-bash-commands-and-constructs","status":"publish","type":"post","link":"https:\/\/small-service.com\/?p=60","title":{"rendered":"useful bash commands and constructs"},"content":{"rendered":"<ul>\n<li><strong>create files with spaces using xargs:<\/strong><br \/>\n<code>ls \/your\/dir | tr -d \"'\" | xargs -t -I {} touch \"{}\"<\/code>\n<\/li>\n<li><strong>send notification from console to desktop:<\/strong><br \/>\n<code>notify-send --expire-time=10000 \"message1\" \"message2\"<\/code>\n<\/li>\n<li><strong>debug gluster client connection:<\/strong><br \/>\n<code>export LC_ALL=C; \/usr\/sbin\/glusterfs --debug --volfile-server=&lsaquo;server&rsaquo; --volfile-id=&lsaquo;volume&rsaquo; \/mount\/to\/<\/code>\n<\/li>\n<li><strong>Reverse string (when server doesn&#8217;t has rev tool, like solaris\u2026)<\/strong><br \/>\n<code>echo 123| perl -ne 'chomp;print scalr reverse . \"\\n\";'<\/code>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>create files with spaces using xargs: ls \/your\/dir | tr -d &#8220;&#8216;&#8221; | xargs -t -I {} touch &#8220;{}&#8221; send notification from console to desktop: notify-send &#8211;expire-time=10000 &#8220;message1&#8221; &#8220;message2&#8221; debug gluster client connection: export LC_ALL=C; \/usr\/sbin\/glusterfs &#8211;debug &#8211;volfile-server=&lsaquo;server&rsaquo; &#8211;volfile-id=&lsaquo;volume&rsaquo; \/mount\/to\/ Reverse string (when server doesn&#8217;t has rev tool, like solaris\u2026) echo 123| perl -ne &#8216;chomp;print [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[27],"tags":[29,28,32,30,31,33],"_links":{"self":[{"href":"https:\/\/small-service.com\/index.php?rest_route=\/wp\/v2\/posts\/60"}],"collection":[{"href":"https:\/\/small-service.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/small-service.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/small-service.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/small-service.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=60"}],"version-history":[{"count":7,"href":"https:\/\/small-service.com\/index.php?rest_route=\/wp\/v2\/posts\/60\/revisions"}],"predecessor-version":[{"id":304,"href":"https:\/\/small-service.com\/index.php?rest_route=\/wp\/v2\/posts\/60\/revisions\/304"}],"wp:attachment":[{"href":"https:\/\/small-service.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=60"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/small-service.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=60"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/small-service.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=60"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}