You just wanted to remove a directory with large no of files in it and you issued the command
$rm -rf *
But the rm throws an error argument list too long, then how to remove the files?
Here is a simple fix that will allow you to remove large no of files easily..
First copy and paste the below code in the terminal
function large_rm() { while read line1 ; do rm -f ./$line1; done; };
Then cd to that directory where you need to remove the files then issue the command
ls -l |large_rm
Thats it.. it will remove all the files in that directory within seconds :)