Argument list too long - help
ubuntuuser at carl-fh.com
Wed Jun 10 18:58:56 UTC 2009
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:~$
Phone: +46 372 15033
More information about the ubuntu-users