Mailinglist Archive: opensuse (2459 mails)

< Previous Next >
Re: [opensuse] /bin/rm: Argument list too long
  • From: Per Jessen <per@xxxxxxxxxxxx>
  • Date: Wed, 26 Mar 2008 21:29:11 +0100
  • Message-id: <fsebmn$epq$1@xxxxxxxxxxxxxxxx>
Randall R Schulz wrote:

On Wednesday 26 March 2008 13:08, Per Jessen wrote:
Istvan Gabor wrote:

How can I delete these files w/o removing the folder itself?

ls -1 .thumbnails/large/* | while read f; do rm $f; done

This is as slow as the find -exec approach and vulnerable to files
with spaces and other special characters in their names.

Sigh. Allright, how about:

ls -1 .thumbnails/large/* | while read f; do rm "$f"; done

The find + xargs approach is still the best for circumstances like

Not without knowing the exact circumstances - it does work very well of
course, but then so does my suggestion, given the right set of
circumstances :-)

/Per Jessen, Z├╝rich

To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups