<p><pre><code>    A simple

    $: ls *

    would load the millions of unique names into memory
    hit the memory max and throw the server into swap
    hell.
</code></pre>
I&#x27;m surprised by that. I&#x27;d expect the shell to abort wildcard expansion when the expanded argument list gets bigger than ARG_MAX, since there is no point in continuing to pile on expanded args past that point.<p>It would be interesting to try this with different shells and see if they all behave this way.<p><pre><code>    Guess what

    $: rm -rf *

    does? That&#x27;s right, it expands the wildcard and
    tries to load the gigs and gigs of names of files
    into memory until it hits swap hell, but
    recursively.
</code></pre>
I do not believe this is correct. It does exactly what &quot;ls *&quot; does with regard to the wildcard. Wildcard expansion takes place in the shell before the command is executed, so the fact that rm is being asked to operate recursively has no bearing on the wildcard expansion.