Sorry about forgetting to reply to the list. I don't understand why touch is the right thing, it doesn't create directories either, just files. Care to explain why did you chose touch instead of ">"? Using the external binary touch to create 10000 files:
*samueloph@teste:~/foo$ time ( for i in $(seq 0 9999) ; do touch $i ; done )real 0m10.245suser 0m3.332ssys 0m1.576s* Using shell built-in ">" to create 10000 files: *samueloph@teste:~/foo$ time ( for i in $(seq 0 9999) ; do > $i ; done )real 0m0.742suser 0m0.064ssys 0m0.120s* ">" is at least 10x faster than touch. But anyways, OP asked for 5000 directories, not files, shouldn't the tests be made with mkdir instead of touch or ">"? Not a big deal tough. Samuel Henrique O. P. [samueloph] Técnico em Informática - UTFPR [2012]. Estudante de Engenharia de Computação - UTFPR.