I accidentally created more than 50K empty files in a folder. When I tried to remove them using rm -rf *.tmp, I got the error -bash: /bin/rm: Argument list too long.
It turns out bash tries to expand the * into a full list, but that list became too long.
Here is how to delete that many files:
find . -name '*.tmp' | xargs rm