--- /dev/null
+// create maaaany files
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <jh.h>
+#include <unistd.h>
+
+int main(int argc, char **argv) {
+ if (argc != 2) printf("bad invocation, want <maxnum>\n"), exit(1);
+ int max = atoi(argv[1]);
+ for (int i=0; i<max; i++) {
+ char name[50];
+ sprintf(name, "%d", i);
+ close(fail_on_neg(creat(name, 0600), "creat() failed", 1));
+ }
+ return 0;
+}