{"id":21,"date":"2005-11-06T04:08:14","date_gmt":"2005-11-06T02:08:14","guid":{"rendered":"http:\/\/www.shukko.com\/x3\/2005\/11\/06\/linux-howto-ya-ek\/"},"modified":"2007-01-12T01:51:43","modified_gmt":"2007-01-11T23:51:43","slug":"linux-howto-ya-ek","status":"publish","type":"post","link":"https:\/\/www.shukko.com\/x3\/2005\/11\/06\/linux-howto-ya-ek\/","title":{"rendered":"linux howto ya ek.."},"content":{"rendered":"<p>find . -name *.log  : xargs rm<br \/>\nwas the way I was going to go, but then it said<br \/>\n-bash: \/usr\/bin\/find: Argument list too long<br \/>\nrm: too few arguments<\/p>\n<p>I also tried<br \/>\nmv *.log \/dev\/null<br \/>\nwhich generated a similar error.<\/p>\n<p>Silly me, I thought it was rm that was complaining when it was in fact bash!!<br \/>\nObviously the string that bash generates by expanding wildcard &#8216;*.log&#8217; is too long for it to pass to any command.<br \/>\nJust like Juri said it is a shell limitation.I have looked, but havent seen any options or shell variables that would let me up this limit.<\/p>\n<p>So I escaped the wildcard and let &#8216;find&#8217; handle it by<br \/>\nfind . -name &#8216;*.log&#8217; : xargs rm<br \/>\nwhich did it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>find . -name *.log : xargs rm was the way I was going to go, but then it said -bash: \/usr\/bin\/find: Argument list too long rm: too few arguments I also tried mv *.log \/dev\/null which generated a similar error. Silly me, I thought it was rm that was complaining when it was in fact [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-21","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/21","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/comments?post=21"}],"version-history":[{"count":0,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/21\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/media?parent=21"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/categories?post=21"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/tags?post=21"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}