root@server:/dir/ # ls | wc -l
1060731
root@server:/dir/ # for i in *; do rm -v $i done; done
me@home:~/ #
HUH?
Turns out that bash just couldn’t eat another byte, and next time I logged in I saw this: “bash[5469]: segfault at 0000007fbf7ffff8 rip 00000000004749bf rsp 0000007fbf7fffe0 error 6“… Impressive š
Your bash is broken. In the old days we accepted limitation on our shell's globs and piped this sort of thing through xargs.
-danny
š I eneded up just rm -r'ing the directory, since it wasnt needed anyways