Argument list too long - help
Muzer
muzerakascooby at gmail.com
Wed Jun 10 19:01:02 UTC 2009
Carl Friis-Hansen wrote:
> On Wed, June 10, 2009 20:53, Muzer wrote:
>
>> Carl Friis-Hansen wrote:
>>
>>> I just discovered that ZoneManager has stored some 87000 png files in a
>>> directory. I have no use of them and wanted to remove them.
>>> That turned out not to be so strait forward:
>>>
>>> carl at cjfh3:~$ rm Webcam_Pictures/*.png
>>> bash: /bin/rm: Argument list too long
>>> carl at cjfh3:~$
>>>
>>> How do I best come around this issue?
>>>
>>>
>> for f in `ls Webcam_Pictures/*.png`; do rm $f; done
>>
>> Should work, obviously not tested. You might want to replace the rm with
>> something harmless like "echo" first, just to make sure.
>>
>
> Sad, it didn't work either:
> carl at cjfh3:~$ for f in `ls Webcam_Pictures/*.png`; do ls $f; done
> bash: /bin/ls: Argument list too long
> carl at cjfh3:~$
>
>
>
for f in `find -name 'Webcam_Pictures/*.png'`; do rm $f; done
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/CM/IT d>++ s+:- a---- C+++ UL+++>++++ P+>+++ L+++>+++++ E---->--- W+++ N o? K? w--- O+ M-- V- PS PE? Y-- PGP- t+ 5? X- R-- tv+ b++ DI D G++ e- h! !r y
------END GEEK CODE BLOCK------
More information about the ubuntu-users
mailing list