<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt">Hmmm... how many ways to do this... If you can't think of at least three, you're not thinking hard enough :-)<br><br>find . -type f | perl -ne 'chop; unlink;'<br><br>Cheers!<br><br>Bob<br><div>&nbsp;</div>--<br>"When once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been, and there you will always long to return."<br>   --Leonardo da Vinci<div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Joshua Johnson &lt;joshpauljohnson@gmail.com&gt;<br>To: nflug@nflug.org<br>Sent: Monday, June 23, 2008 2:37:52 PM<br>Subject: Re: [nflug] rm Limitations<br><br>
Either rm the whole directory or (like Frank said) iterate through them:<br><br>for file in `ls`; do rm -f "$file"; done<br><br>This has been a discussion on here before and there are faster ways to do this. They escape me right now. The problem is that there is a limit to how many arguments you can give on the command line.<br>
<br><div class="gmail_quote">On Mon, Jun 23, 2008 at 2:22 PM, Franklin Kumro Jr &lt;<a rel="nofollow" ymailto="mailto:fkumro@gmail.com" target="_blank" href="mailto:fkumro@gmail.com">fkumro@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Iterate over the dir listing and rm each file<br>
<br>
Should work!<br>
<br>
-Frank<br>
<div><div></div><div class="Wj3C7c"><br>
On Mon, Jun 23, 2008 at 10:42 AM, Robert Wolfe &lt;<a rel="nofollow" ymailto="mailto:robertwolfe@localnet.com" target="_blank" href="mailto:robertwolfe@localnet.com">robertwolfe@localnet.com</a>&gt; wrote:<br>
&gt; Hi all!<br>
&gt;<br>
&gt; I have a BUNCH of files I need to clean out of a directory, but when I execute 'rm *' I get an "Argument list too long" error message. &nbsp;Is there a way around this? &nbsp;I get the same when mv'ing or cp'ing to /dev/null as well.<br>

&gt;<br>
&gt; --<br>
&gt; Robert Wolfe &lt;<a rel="nofollow" ymailto="mailto:robertwolfe@localnet.com" target="_blank" href="mailto:robertwolfe@localnet.com">robertwolfe@localnet.com</a>&gt;<br>
&gt;<br>
&gt; "The only good thing about Vista is that even<br>
&gt; &nbsp;the viruses have compatibility issues. "<br>
&gt; _______________________________________________<br>
&gt; nflug mailing list<br>
&gt; <a rel="nofollow" ymailto="mailto:nflug@nflug.org" target="_blank" href="mailto:nflug@nflug.org">nflug@nflug.org</a><br>
&gt; <a rel="nofollow" target="_blank" href="http://www.nflug.org/mailman/listinfo/nflug">http://www.nflug.org/mailman/listinfo/nflug</a><br>
&gt;<br>
<br>
<br>
<br>
</div></div><font color="#888888">--<br>
Frank<br>
Shenanigans!!<br>
I do the voodoo that I do do with sudo!<br>
</font><div><div></div><div class="Wj3C7c">_______________________________________________<br>
nflug mailing list<br>
<a rel="nofollow" ymailto="mailto:nflug@nflug.org" target="_blank" href="mailto:nflug@nflug.org">nflug@nflug.org</a><br>
<a rel="nofollow" target="_blank" href="http://www.nflug.org/mailman/listinfo/nflug">http://www.nflug.org/mailman/listinfo/nflug</a><br>
</div></div></blockquote></div><br>
</div></div></div><br>



      </body></html>