Hi Paul (Fox),
so, i've stumbled over rmmproc's limit in the past (and, like others,
have quietly, manually, done it in chunks instead), but i don't think
i've ever seen a similar limit with "rm". and now i'm wondering, why
not? certainly this works just fine:
$ mkdir /tmp/many
$ cd /tmp/many
$ touch $(seq 1 100000)
$ ls | wc -l
100000
$ rm *
$ ls
$
i didn't strace it, but i assume that touch and rm are both executed
just once by the shell.
They are, yes. Note that your touch is the first time 1e5 arguments are
passed to a command; the shell's glob of `*' will be a similar sized
list for rm. So if the touch worked, rm should too.
Adding a 0 breaks it for me.
$ LC_ALL=C strace -fe execve bash -c 'touch $(seq 1000000)'
execve("/bin/bash", ["bash", "-c", "touch $(seq 1000000)"],
[/* 59 vars */]) = 0
Process 11409 attached
Process 11410 attached
Process 11409 suspended
[pid 11410] execve("/usr/bin/seq", ["seq", "1000000"],
[/* 58 vars */]) = 0
Process 11409 resumed
Process 11410 detached
[pid 11409] --- SIGCHLD (Child exited) @ 0 (0) ---
Process 11409 detached
--- SIGCHLD (Child exited) @ 0 (0) ---
execve("/usr/bin/touch", ["touch", "1", "2", "3", "4", "5", "6",
"7", "8", "9", "10", "11", "12", "13", "14", "15", ...],
[/* 58 vars */]) = -1 E2BIG (Argument list too long)
bash: /usr/bin/touch: Argument list too long
$
Cheers, Ralph.
_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers