On Fri, Dec 19, 2003 at 11:47:32AM +0200, Dobai-Pataky Balint wrote: > > > hi, > > i have a webcam logging all motion into jpgs, my php code does lots with > it, except after i convert selected jpgs copied into the workin' folder, > and after conversion i'd like to rm them from php or by hand it'll give: > rm *.jpg > su: /bin/rm: Argument list too long > > so i have to enter mc, enter the directory and F8 them out. > > how could i do a right rm? > (without generating a shell pattern to rm them in separated groups) > Hi Dobai, this is my favorite little bash snippet. ls *.jpg | while read filename; do rm $filename; done or find *.jpg | while read filename; do rm $filename; done -Kev
Attachment:
signature.asc
Description: Digital signature